Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Switch/Format to not interpret metacharacters in regex?

by Laurent_R (Canon)
on Dec 05, 2019 at 17:27 UTC ( #11109702=note: print w/replies, xml ) Need Help??


in reply to Switch/Format to not interpret metacharacters in regex?

See also the built-in quotemeta function (which does something very similar to \Q ... \E).

Replies are listed 'Best First'.
Re^2: Switch/Format to not interpret metacharacters in regex?
by afoken (Canon) on Dec 05, 2019 at 20:44 UTC
    See also the built-in quotemeta function (which does something very similar to \Q ... \E).

    Not only similar. quotemeta is the function implementing the \Q escape, according to quotemeta.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Yes, afoken++, you're right. I did not want to say that they are identical, because they have a different calling syntax, but, yes, they do the same thing.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2020-10-01 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (173 votes). Check out past polls.

    Notices?