Translate

Friday, November 7, 2014

REGEX  :Identify Comma outside  Double Quotes







If  you want to identify each comma outside double quotes this is the regex:

(?!\B"[^"]*),(?![^"]*"\B)

Result:


but if you are using PHP the regex above  will not going to work ,so you can use this regex: 

Regex: (,)(?=(?:[^"]|"[^"]*")*$)

Result:



No comments:

Post a Comment