Question

I was looking for some help in regards to a csv file that i am trying to upload into a database. The problem I have is that within a csv I have a field of text with quotations and within this text I have a problem where users have added a carriage return (LF) and commas so the database is having some problems in adding the data to the correct fields. What I would like to do, is replace any (LF) within quotations with a space using regular expressions. I have had a look at the following link:

Seeking regex in Notepad++ to search and replace CRLF between two quotation marks ["] only

but the example shown doesnt seem to tackle the problem. If possible can somebody please advise how i can fix this issue.

Thanks in advance.

No correct solution

OTHER TIPS

Try this:

Find What:  (\"[^"]*?)(\r\n)([^"]*?\")
Replace With: $1 $3

thanks for all your help. I managed to open the file in Excel and the column that had the (LF) I wrote the formula =CLEAR(cell) and this brought everything into 1 line and when I opened the same file the in Notepad++ the issue was no longer there.

Thanks for taking your time to help me out, really appreciate it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top