I'm not sure I'm reading your question right, but you're wondering why [^(abc)] doesn't match the string abc?
The square brackets enclose an expression that will match one character. The construct you show will match anything other than (, ), a, b, or c. I think that's what your description is trying to say.
You can get the effect you want in Perl newer than 5.6.1 with a lookbehind assertion: print if /(?<!abc) nevermind/There are other ways to do it, using $PREMATCH, but this will work for fixed strings. More information at perlre, the section about lookbehind.</code>
That is, if I read your question correctly....
In reply to Re: stupid question about regexp - not matching a word
by VSarkiss
in thread stupid question about regexp - not matching a word
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |