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
(?<quote>["]?)(?<param>(?:\k<quote>{2}|[^"]+)*)\k<quote>[ ]+
Description
this regex was developed for command line parsing. it will get you one parameter per match while checking for strings enclosed in double quotes and double quotes escaping (&quot;&quot;). --&gt;you will have to add a trailing space to your input string for this regex to get your last param too
Matches
"user name" password | sa "" | "user" "i like ""quotes&
Non-Matches
it | matches | everything
Author Rating: Not yet rated. Mr Regex
   Displaying page 1 of 1 pages; Items 1 to 1

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