Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
;(?=(?:[^"]*"[^"]*")*[^"]*$)
/
g

Description

Replace all occurences of the caracter ; except if it placed between two " signs.

Submitted by ccroche helped by ChatGPT - 8 months ago