Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Regex expression is matching more than once

by Corion (Pope)
on Apr 22, 2013 at 07:54 UTC ( #1029816=note: print w/ replies, xml ) Need Help??


in reply to Regex expression is matching more than once

tr replaces characters, while s/// replaces substrings.

Your code in fact removes all characters in the set lmx.()$ from the target string.

Update: Athanasius pointed out that I missed the dollar sign in what tr replaces. The expression given to tr// does not interpolate variables.


Comment on Re: Regex expression is matching more than once
Select or Download Code
Re^2: Regex expression is matching more than once
by tobias_hofer (Friar) on Apr 22, 2013 at 08:02 UTC

    Oh.. Thanks a lot!
    Next time I will read the perl doc more carefully!
    Promised! ;-)
    Cheers!
    Tobias

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2015-07-03 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls