consider the following code:
perl -wne 'chomp;print if m/[^(?:test)]/'
I was surprised to see that grouping inside a character class works, How does this differ from  (?!pattern)?
consider the following code:
perl -wne 'chomp;print if m/[^(?:test)]/'
I was surprised to see that grouping inside a character class works, How does this differ from  (?!pattern)?
/[^(?:test)]/
is not grouping within the char class. All the char listed in the [ ] after ^ will be treated literally and this will match any string that contains char other than ( ? : t e s t )