Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: regex for negating a sequence

by ikegami (Pope)
on Oct 03, 2006 at 19:35 UTC ( #576172=note: print w/replies, xml ) Need Help??

in reply to Re: regex for negating a sequence
in thread regex for negating a sequence

Your regexp can be simplified to the following:


If you'd rather have simplicity at the cost of an extra check, use the following:


is the equivalent of
but it (negatively) matches entire regexps instead of a choice of characters.

Replies are listed 'Best First'.
Re^3: regex for negating a sequence
by ysth (Canon) on Oct 03, 2006 at 20:25 UTC
    Another alternative:
    I've interpreted "does not appear" differently than you when the eighth char is the \x26 of a \x26\x67 sequence.
Re^3: regex for negating a sequence
by davidrw (Prior) on Oct 03, 2006 at 20:40 UTC
    nice. My first attempt was trying to do it like that, but i started with something like:
    which doesn't work for the case of consectutive sequences.. i just didn't think of putting the look-ahead behind the dot :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://576172]
[1nickt]: Gotya.
[LanX]: hmm reviews have no vote button?
[1nickt]: I use many books for purposes other than that for which they were written: decoration, paperweight, coffee mug coaster on the good table ...
[LanX]: ah Vote button missing on Review threads

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-11-17 21:48 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (274 votes). Check out past polls.