I’ve got a CSV file from an Access Database for importing into MySql. It contains a catalogue of Books and Journals. It’s delineated by semicolons. It has about 4000 entries.
The problem I have is that the titles of many of the books and journals listed contain semicolons.
What i’m looking for is a simple RegEx search to run in Sublime Text 2 to finds the lines, in the .csv file, that have a greater number than 5 semicolons.
This will let me quickly edit the offending Titles rather than trying to read the entire DB.
I’m not too familiar with RegEx so be gentle…
Many Thanks
You can just use this regex:
It will highlight (part of) any line with 5 or more
;.Simply put, the regex will search for 5 instances of [0 or more of any character (except new line)
.*followed by;].In depth explanation would involve the talk about greedy quantifier, in which the
.*part (with*being quantifier for 0 or more, and it is also greedy) eats up as much text as possible. As a result, even if there are more than 5;in the line, all of them become part of the match, which makes the rest of the line unmatchable and the match has to continue on the next line.