help-bison
[Top][All Lists]
Advanced

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

Re: Non-greedy wildcard possible? (Long)


From: Frank Heckenbach
Subject: Re: Non-greedy wildcard possible? (Long)
Date: Thu, 27 May 2004 00:30:58 +0200
User-agent: semail 20040101

Laurence Finston wrote:

> > > What I was thinking of
> > > was the problem of matching a regexp like
> > > ".*^(`a' || 'bb' || 'ccc' ...)" standing for "any string not ending in
> > > `a', `bb', `ccc', etc.
> 
> My notation was ad hoc, which is why I explained what I meant.  The way I used
> the `^' character was adapted from Emacs' regexps where `[^fg]' means "neither
> f nor g".  I used an ad hoc notation because I don't know whether the
> construction I used as an example can be formulated using Emacs' regexps;  I
> don't think so, but maybe it can.

There is no direct syntactic way of expressing this (in any usual
regex format I know). But since regexs are closed under union,
intersection and complement, it's possible to construct such a
regex. It will however, look rather ugly.

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)




reply via email to

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