Regular Expressions 101

Library entries

parsing CSV file

Vote

5

Regular Expression
pcre

/
(?:(?<=^)|(?<=,)) # start of line or comma (?:(?!$)\s)* # skip whitespace "? # skip opening quote mark ( (?<=").*?(?=") # capture value in quotes | # or ((?!,)\S)* # capture just value ) "? # skip closing quote mark (?:(?!$)\s)* # skip whitespace (?=$|,) # command or the end of the line
/
gmx

Description

Loading markdown...
Submitted by Viktor Lova aka nsinreal - 7 years ago