|
|
| Just another Perl shrine | |
| PerlMonks |
Re: Using special characters in left part of a regex match?by moritz (Cardinal) |
| on Feb 06, 2013 at 00:11 UTC ( #1017306=note: print w/ replies, xml ) | Need Help?? |
|
$var[$j] =~ s/\.\.\./\.\+/g; The right half of an s/// substitution is not a regex, but a mere string. So if you want to construct .+ in the replacement, you need to write it as .+ and not at \.\+.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||