Regular Expressions 101

DoubleQuote Enclosed CSV Field with Escaped DoubleQuote

Open Workspace
  • PCRE2 (PHP)
  • Match
1

Regular Expression

/
^ (?: "((?:[^"]|"")*)" # Quoted field, capture inner content | ([^",]*) # Unquoted field, capture content (no comma or quote) ) $
/
x

Description

Extract field value of DoubleQuote Enclosed CSV Field with Escaped DoubleQuote The matching field value still contains escaped double quotes to be later processed :-)

Submitted by Alper YAZGAN