Thursday, 15 August 2013

Regex look for all quotes not preceded by a comma

Regex look for all quotes not preceded by a comma

I have a csv file that is not well formatted and I need to look for extra "
This is how it looks like:
"1","title","desc desc dejdg sdjgh djhg"
"2","title2","desc jhgdj **"jhsgfjhsgd"** jhgd"
I need to look for any " that doesn't have a , before
(\")(?!\,)
this would mean look for any " that doesn't have a , after; but I don't
know how to look for a , before the ".

No comments:

Post a Comment