Community Patterns

Community Library Entry

35

Regular Expression
Created·2014-05-12 13:35
Flavor·ECMAScript (JavaScript)

/
([+-]?(?:'.+?'|".+?"|[^+\- ]{1}[^ ]*))
/
g
Open regex in editor

Description

Attempts to mimic Google search box behavior, returning an array with the separated search strings (that keep the +/- indicator for following operations)

Submitted by mettjus