[Discuss] Regular expressions and Boolean logic
Steven Kurylo
sk at infinitepigeons.org
Sun Jul 15 14:58:18 PDT 2007
On 7/15/07, D. S. <news.observer at gmail.com> wrote:
> If CMake uses pcre (perl compatable regular expressions), then you
> might look at a "zero-width negative look-ahead assertion", and see if
> it fits your case. It is described in the perl regular expressions
> (perlre) man page. Even if that worked, it would look messy. (But
> then again, how many REs are readable at first glance?)
>
> Maybe the boolean combination of regular expressions can be done in
> CMake itself?
I don't you'll be able to find something very usable, unless CMake
always you to negate the entire regular expression, or some kind of
boolean logic.
That being said, this regex will not match foo.pdf and bar.pdf, but
will match everything else.
^.(?!((?<=f)oo|(?<=b)ar)\.pdf$)
--
Steven Kurylo
More information about the Discuss
mailing list