in reply to Re: Yet Another Regex Question
in thread Yet Another Regex Question
In other words, we're going to substitute out a colon, but only if that is preceded by five caps, but only if the five caps in turn are not preceded by six non-newline characters. Is that what you intended? If so, was that intended as a work-around for the '^' anchor? If it was, I see a lot of problems with it.$test =~ s# (?<! # Negative lookbehind .{6} # Six of any non-newline character ) (?<= # Positive lookbehind [A-Z]{5} # Five caps ) : # Here's what we're really substituting #:</B>\n<BR><BR>#;x
Regardless, I'm stuck with my original question: can regex string anchors and lookbehinds be combined?
Cheers,
Ovid
Update: tye, read my commentary in addition to the regex comments and you'll see that we agree. My wording may have been odd, but it's there. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: (Ovid) RE(2): Yet Another Regex Question
by tye (Sage) on Aug 11, 2000 at 21:55 UTC |