Regular Expressions 101

Community Patterns

Split by character outside quotes

0

Regular Expression
ECMAScript (JavaScript)

/
[^'":]*(("[^"]*"|'[^']*')[^'":]*)*
/
g

Description

Splits text by a character which is not inside the quotes. Example: foo:"01":"02:03":"04:05:06":"07:08:09:10" ^^^ ^^^^ ^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^

Submitted by .iqqmuT - 8 years ago