RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details 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
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials