Linebreak after text with number in different lengh
-
Hello folks
I don’t find a solution for my problem, so sorry for asking here.
Input:
I have a csv-file (Windows CR LF) with normally about 40k rows, but they are all in one line. I want to add a linebreak after ever B12345 and V12345. The number length could variate. I have ; as separator and have added “” to every entry between the separator.Input example:
“B1000037”;“testtext”;“test / text”;“V1234”;“testtext2”;“test / text”;Expected outcome:
“B1000037”;“testtext”;“test / text”;
“V1234”;“testtext2”;“test / text”;Main reason:
I have a csv with linebreaks from an editor and excel can’t handle this to know that is the above line because of the LF. So i had to change the rows to one line and re-linebreak them at the right position so that excel can handle them well.Tested replace from my side:
I have tested the following rule:Find what: "B[\d{1,9}] Replace with: \r\n
Outcome of my own test:
It works with the linebreak but it always kills the first 2 chars like:
“000037”;“testtext”;“test / text”;
“234”;“testtext2”;“test / text”;I hope this is enough info and i’m hoping for an answer here. It could also be in two steps.
Greetings, Andi
-
@Andi You want:
Find what :
;("[BV]\d++";)
Replace with :;\r\n\1
-
@Coises That worked perfectly, many thx for the fast response. Have a nice day.