Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: regexp: s/// vs s"""

by inman (Curate)
on Feb 21, 2006 at 14:42 UTC ( #531705=note: print w/ replies, xml ) Need Help??

in reply to regexp: s/// vs s"""

The first character following the s is used as a delimiter. If the character is normally paired, a matching pair is used.

s/match/replace/; #The conventional way s|match|replace|; #Useful for urls that contain /s s(match)(replace); #matched braces

This gives you some flexibility with respect to the code that you are working with. Take care when using characters that are also used in regex notation.

Comment on Re: regexp: s/// vs s"""
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2015-10-09 09:31 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (237 votes), past polls