$ perl -e 'print "broken\n" if "foo" =~ /[.]/' $ perl -e 'print "ok\n" if "foo." =~ /[.]/' ok
The period is not magical inside a character class.
-sam
In reply to Re^2: Correct Regex for reading stock symbol?
by samtregar
in thread Correct Regex for reading stock symbol?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |