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

Re^5: Help with a regular expression for file name parsing

by Anonymous Monk
on Dec 07, 2011 at 13:53 UTC ( #942248=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Help with a regular expression for file name parsing
in thread Help with a regular expression for file name parsing

Question: What should SOME EXPRESSION be, so that if SOME STRING is...

Such a regular expression cannot exist, not in an if block

You can match the filename portion (for which you already got a regex that works), but you have to remove the quotes and escapes afterwards (using s///|substitution operator)

In short, you want a function that does the job


Comment on Re^5: Help with a regular expression for file name parsing
Re^6: Help with a regular expression for file name parsing
by bontchev (Sexton) on Dec 09, 2011 at 08:08 UTC

    Such a regular expression cannot exist, not in an if block

    OK, understood. I'll have to do it in two or more steps, then.

    You can match the filename portion (for which you already got a regex that works), but you have to remove the quotes and escapes afterwards (using s///|substitution operator)

    OK, that's what I'll do, although just removing the backslashes seems too primitive to me. I'll try to find a better solution.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-04-18 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (464 votes), past polls