$theVar = "This is a test";
if ($theVar =~ /is [^a] tes/) {
(print "Match One\n"); # Would Not Match
}
if ($theVar =~ /is [^A] tes/) {
(print "Match Two\n"); # Would Match
}
| Construct Symbol | Meaning | Same As |
|---|---|---|
| \d | Digit Character | [0-9] |
| \w | Word Character | [a-zA-Z0-9_] |
| \s | Space Character | [ \r\t\n\f] |
| \D | Not Digit Character | [^0-9] |
| \W | Not Word Character | [^a-zA-Z0-9_] |
| \S | Not Space Character | [^ \r\t\n\f] |