you also don't escape characters in a character class.
That's not very good advice. Sometimes you certainly do need to escape characters in a character class. Take the following for example:
$ perl -le '$_ = q/f!o@o#b$a%r^b&a*z/; s/[!@#$%^&*]//g; print'
-sauoq "My two cents aren't worth a dime.";
In reply to Re^2: regex question
by sauoq
in thread regex question
by lepetitalbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |