I have a string with quotes around the path as follows:
"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" arg1 arg2
If I use Text.Split(new Char[] { ' ' }, 2);
then I get the first space.
How to get the path and args ?
argscpathstring
I have a string with quotes around the path as follows:
"C:\Program Files (x86)\Windows Media Player\wmplayer.exe" arg1 arg2
If I use Text.Split(new Char[] { ' ' }, 2);
then I get the first space.
How to get the path and args ?
Best Answer
Try splitting on the double quotes (Text.Split(new Char[] { '/"' }, 3);) then taking the last string in that array and splitting again on the space.
I may have a syntax error in there, but you get what I mean.