Regular Expressions 101

Community Patterns

1...45678...901

Community Library Entry

7

Regular Expression
ECMAScript (JavaScript)

/
"([^"\\]*(?:\\.[^"\\]*)*)"|\w+|'([^'\\]*(?:\\.[^'\\]*)*)'
/
g

Description

Find " and ' quoted strings and "orphaned"/single words in a string

Submitted by LoveIsGrief - 11 years ago