Title |
Test
Find
Pattern Title
|
Expression |
"{0,2}(?:(?:\\\\(?:\w+)\\(?:\w+\$?)|(?:[A-Z]):)(?:\\(?:[^\\:*?"'<>|\r\n]+))+|(?:[^\\:*?"'<>|\r\n]+))\.exe"?\ (?<commandstring>(?:[^\r\n]*(?=")|[^\r\n]*)) |
Description |
Written to test the .NET System.Environment.CommandLine string for the existance of arguments. If a match is found, the command arguments can be extracted by retrieving a MatchCollection and retriving the index "commandstring". Works with local and UNC filepaths. |
Matches |
""\\corp10\D$\temp1\temp2\file 3.exe" /out:library" | C:\file2.exe /a | file2.ex |
Non-Matches |
"\\corp10\D$\temp1\temp2\file 3.exe" | C:\file2.exe | "Temp App.exe" |
Author |
Rating:
Not yet rated.
Brandon Haase
|
Source |
|
Your Rating |
|
Title: Great work!
Name: Nick
Date: 2/19/2009 11:49:32 PM
Comment:
Now besides the PathGetArgs() API, Theres a way to extract arguments from a command!