regexp [. .]

Parv parv at
Sat Jan 20 21:41:46 UTC 2007

in message <op.tma17juchbloih at>,
wrote applecom at thusly...
> On Wed, 17 Jan 2007 07:15:34 +0500, Parker Anderson
> <baka.rob at>  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' ...


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

  - Parv


More information about the freebsd-questions mailing list