Title |
Test
Find
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 ("").
-->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
|
Source |
|
Your Rating |
|
Title: buggy
Name: eidylon
Date: 6/4/2010 4:16:07 PM
Comment:
fails for a very simple string:
"this is a test" and my door
I would expect 4 matches: ["this is a test", and, my, door]
but it only returns two: ["this is a test", and my door]
Title: great regex
Name: dr pepper
Date: 9/12/2005 7:30:47 AM
Comment:
does exactly what i need