On Sunday, 19 June 2016 at 17:49:55 UTC, ag0aep6g wrote:
I don't know if you can solve this with regex alone. May depend
on what exact behavior you want. Maybe just write a little
function instead that splits the command line, handling quotes
and such as you want. If you're not comfortable writing this,
then maybe you're in over your head here.
Of course, all this wouldn't be necessary if you could change
the command line instead to conform with the usual syntax. If
the weird behavior you're going for is just personal
preference, and there's no actual need, I'd suggest to just
write the command lines in the normal way with escape sequences
(i.e. "foo\\" to get a trailing backlash instead of a trailing
quote).
What you suggest is non-standard in Windows, and besides I might
not be the only user of the application.
I was thinking in doing pecisely what you suggest, writing a
little function.
I like programming little apps now and then as a hobby, but
giving up every time I encounter a difficulty is not for me. I
was just asking in case some of the experienced D programmer here
could recommend an efficient and preferably simple way to do it.
;)