Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?:(?<!\\)|(?<=\\\\))(\")
/
g

Description

I'm having issues escaping quotes inside json content. I can get the " to be put in if " is seen, the issue is I don't want that to be done if " is in the content (as that is already escaped)

Submitted by Patrick - 10 years ago