|
Boost Users : |
From: Roman Neuhauser (neuhauser_at_[hidden])
Date: 2006-09-08 12:05:12
# telya_at_[hidden] / 2006-09-08 12:23:36 +0300:
> Hi
>
> <http://www.boost.org/libs/regex/doc/syntax_perl.html>
> http://www.boost.org/libs/regex/doc/syntax_perl.html says:
>
>
> Perl Regular Expression Syntax
>
>
> In Perl regular expressions, all characters match themselves except for the
> following special characters:
>
> .[{()\*+?|^$
> Q: what about "]}" symbols?
They're only special if there's a matching "[" or "{" earlier in the
pattern:
> echo 'aaa]}]}]}bbb' | perl -pe 's/(]|})+//'
aaabbb
> echo 'aaa]}]}]}bbb' | perl -pe 's/[]}]+//'
aaabbb
> echo 'aaa}}}]]]bbb' | perl -pe 's/}+//;s/]+//'
aaabbb
-- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net