Perl-Sensitive Sunglasses | |
PerlMonks |
Re^5: Inherited a perl script...need help (s///)by Preceptor (Deacon) |
on Nov 12, 2015 at 22:50 UTC ( [id://1147615]=note: print w/replies, xml ) | Need Help?? |
Bear in mind that a sed style pattern replace like that is a substring match. So it will _also_ match longer numbers of which that's a substring. You need to anchor it - either with lookaround (which restricts a pattern from matching based on what happens before/after it) - or you can match on something like \b which is a word boundary.
In Section
Seekers of Perl Wisdom
|
|