in reply to Regex help
If u want to this by the explicitly instead of using the quatemeta just add the character you want to prefix with the "\" in the substitute.
while(<>){ $_=~ s/([\$|\||\[|\)|\\|\/|\(])/\\$1/g; print; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regex help
by bingohighway (Acolyte) on May 06, 2009 at 13:34 UTC |