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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Help with a regular expression for file name parsing
by Anonymous Monk on Dec 07, 2011 at 13:53 UTC

    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

      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.