
# telya@mail.ru / 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