Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 16:41:46 -0500
From:      Parv <parv@pair.com>
To:        applecom@inbox.ru
Cc:        Parker Anderson <baka.rob@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: regexp [. .]
Message-ID:  <20070120214146.GC1221@holestein.holy.cow>
In-Reply-To: <op.tma17juchbloih@xml.opera.com>
References:  <op.tl9w6ajvhbloih@xml.opera.com> <ff4d9d1d0701161815u28938c6ds7614c525dd090eb3@mail.gmail.com> <op.tma17juchbloih@xml.opera.com>

next in thread | previous in thread | raw e-mail | index | archive | help
in message <op.tma17juchbloih@xml.opera.com>,
wrote applecom@inbox.ru thusly...
>
> On Wed, 17 Jan 2007 07:15:34 +0500, Parker Anderson
> <baka.rob@gmail.com>  wrote:
> 
> >Is there a certain match you are trying to pattern?  From the
> >looks of it, [ch]* would match a similar set of characters, but
> >it isn't as strict about which pattern they should be in.
> 
> I need 'some[^[.pattern.]]' working, i.e. matching 'some' if it
> isn't  followed by 'pattern'. Curiously that seems there isn't
> additional  information about it somewhere except the page you've
> denoted.

I missed the beginning of the thread, but in case you are|can use
perl, following use of zero-width negative look-ahead assertion will
match 'some' that is not followed by 'pattern' ...

  'm/some(?!pattern)/'


See perlre(1), "(?!pattern)" section (& around it) for details.


  - Parv

-- 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070120214146.GC1221>