|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: remove chars with regexby johngg (Canon) |
| on Feb 26, 2025 at 11:05 UTC ( [id://11164091]=note: print w/replies, xml ) | Need Help?? |
|
An alternative to using a regex is substr applied at either end of the string.
I hope this is helpful. Update: Re. AnonyMonk's comment regarding negative offsets, I had completely forgotten that, how dumb am I :-( Update 2: Here's the amended code.
Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||