in reply to Re^5: Using regex to separate parameters
in thread Using regex to separate parameters

a 1:n solution

ikegami can you provide an example please?

because I run this script on linux problem with blanks in the file path solved easy by substitution with "\ ". Case-sensitivity-naming not a problem on linux too (but on windows where Text.txt, TEXT.TXT and text.txt can co-exist in the same directory).

I can parse msdos notation too:
c:\windows\system32\tourst~1.exe
with
\w{1-7}~\n+\.\w{3}


here an another missleading example:

start bar where bar - executable without extension. But ok, this is OT, out of scope of my question about parameters.

Replies are listed 'Best First'.
Re^7: Using regex to separate parameters
by jethro (Monsignor) on Jul 06, 2008 at 23:14 UTC
    ikegami 1:n solution is to take all possible interpretations and work with all of them. If you don't know whether 'foo bar' is 'foo.exe bar' or 'foo\ bar.exe' then give both back as solutions. This makes sure you don't overlook a valid interpretation, but it generates more false positives.