Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

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

Description

Splitting string on parts. Able quoted strings and escaped chars. Without optimizations.

command arg1 "string arg "qoute" demo" arg3

Submitted by anonymous - 8 years ago