Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Trim Two Characters On Line

by tybalt89 (Prior)
on Oct 23, 2020 at 13:21 UTC ( #11123088=note: print w/replies, xml ) Need Help??


in reply to Trim Two Characters On Line

perl -le 'for(@ARGV){ s/(?=SUM).*\K..//; print }' abcSUMcdexx abcSUXcd +exx abcSUMc

Outputs:

abcSUMcde abcSUXcdexx abcSU

( borrowing bits and pieces and ideas from other monks... )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11123088]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-02-27 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?