in reply to (arturo) Re: matching the non-presence of a string
in thread matching the non-presence of a string
Ah, now I feel silly. You're right, of course. ($!) is what I wanted. My regex has gotten a bit uglier, but it works if I do it this way:
$nomatch="(?!http|telnet|gopher|...|\"|'|\/| )"; . . . ( $nomatch [^'" >]+? ) . . .
I don't quite understand why the $nomatch substitution works, but it's probably something simple too and this is a better solution anyway. I just have one place to update if things need to be changed.
As an aside, since my goal is to re-write the urls in place, I don't see how HTML::LinkExtor would help. I can get the links just fine, I'm just having problems doing the re-writing inline. Am I missing something there?
-J.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (arturo) Re: matching the non-presence of a string
by arturo (Vicar) on Mar 21, 2001 at 21:11 UTC |