[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp and strings you don't want

From: Ilya Zakharevich
Subject: Re: regexp and strings you don't want
Date: Sat, 30 Aug 2003 14:50:46 +0000 (UTC)

[A complimentary Cc of this posting was sent to
<address@hidden>], who wrote in article <address@hidden>:
> I guess one meaningful meaning of the hypothetical x\\(!:top\\)y would
> be to look whether the characters following x are t-o-p.  If so, then
> fail.  If not, then do like xy would have done.
> That's what Perl does, I believe.

Keep in mind that Perl has very primitive REx engine.  E.g., "onion
rings" (google for me and this) are not supported.

The semantic of "onion rings" is that

  A & B & C &! D & E

will match if A can match, and the *substring* which A matched matches
B, C, E, and does not match D.  The syntax is not defined (until it is

[But even with primitive state one can do negation without a problem:
(?!.*B) will match anything which does not contain B (if you put this
expression up front).]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]