Reputation: 13
I have a CSV file with lines like this:
I tried the regexp (^Option,.+,.+[^;].+,,) to find lines above, but excluding the lines with ";" characters in third comma separate value. My regexp is not working, is not excluding the lines I don't want to find.
Upvotes: 1
Views: 11635
Reputation: 89566
Instead of using the dot that is too permissive, use negated character classes like that:
(^Option,[^,]+,[^,;]+,,)
[^,]
means all characters except ,
Note: the parenthesis are probably not useful.
Upvotes: 7