Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Escaping quotemeta() in regex

by sweetblood (Parson)
on Nov 30, 2005 at 18:28 UTC ( #513038=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Escaping quotemeta() in regex
in thread Escaping quotemeta() in regex

That's my question :)

Sweetblood


Comment on Re^4: Escaping quotemeta() in regex
Re^5: Escaping quotemeta() in regex
by ikegami (Pope) on Nov 30, 2005 at 18:43 UTC

    My first post in this thread pointed out there is NO inherent distinction. Any distinction would have to be imposed by you, the designer. Any distinction we come up with would be arbitrary and thus have limitations, so we can't answer your question.

    We really can't help you until you explain what \dth\d\file.txt should become.

    • Should the first "\" should be escaped?
      • Yes? What if the user wants to match "4th..." and "5th...", but not "\dth..."?
      • No? What if the user wants to match "\dth...", but not "4th..." and "5th..."?
    • Should the second "\" should be escaped?
      • Yes? What if the user wants to match "...th4..." and "...th5...", but not "...th\d..."?
      • No? What if the user wants to match "...th\d...", but not "...th4..." and "...th5..."?
    • Should the "." should be escaped?
      • Yes? What if the user wants to match "...file_txt"?
      • No? What if the user doesn't want to match "...file_txt"?

    We can show you how if you tell us what you want, but you haven't given us nearly enough information.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (19)
As of 2014-10-22 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (119 votes), past polls