I came across the following paragraph in perlretut regarding negation of character classes:
"Because a period is a metacharacter, it needs to be escaped to match as an ordinary period. Because, for example, \d and \w are sets of characters, it is incorrect to think of [^\d\w] as [\D\W]; in fact [^\d\w] is the same as [^\w], which is the same as [\W]. Think DeMorgan's laws."
My question is, why is it incorrect to think of [^\d\w] as [\D\W]?
explained it clearly, (I realized after the fact), I still didn't get it, duh! Zaxo
's explanation turned on the light bulb. Thanks to all. Next stop, google for DeMorgan's laws. Thank's to BrowserUK
for giving me something to play with.