Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-02-13 03:07
Flavor·ECMAScript (JavaScript)

/
(?:(?:(?:")+((?:(?:[^\\"]+)(?:(?:(?:\\)*(?!"))?(?:\\")?)*)+)(?:"))+|([^ ]+)+)+(?: )?
/
g
Open regex in editor

Description

first group matches quoted strings second group plain text, arguments are separated with a space. example: "this is a "string"" thisisnot "another "string" with a backslash "\"" just replace " with " after matching.

Submitted by anonymous