Hi guys,
How to remove empty lines in the CSV FF, if it comes in the middle ?
For example:
there are 4 rows.
A,B,C,D=>Row#:1
A,B,C,D=>Row#:2
A,B,C,D=>Row#:3
A,B,C,D=>Row#:4
If you see that, there is an empty line between Row#:3 & Row#:4
I can check null or blank using loop. I don’t want to check it inside loop.
During FF conversion itself, I would want to remove the empty lines.
Could you please help me to remove the empty lines?
Sasanka
(Sasanka *)
October 31, 2018, 3:40pm
2
Hello,
To me, you can write a java service to remove the empty lines after loading the file into integration server. Then, you can use the convertToValues service to parse its content.
Regards
Sasa
You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.
searchString=(?m)*\r?\n
useRegex=true
You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.
searchString=(?m)*\r?\n
useRegex=true
[/quote]
HI Mahesh,
I just tried it now but it did not work out…
Could you please help me further?
You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.
searchString=(?m)*\r?\n
useRegex=true
HI Mahesh,
I just tried it now but it did not work out…
Could you please help me further?
Strange! I tried on my machine before posting it, can you attach a sample package or the FF string here.
Try to check the regex expression and extend it as per your FF content, there might be multiple line breaks.
You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.
searchString=(?m)*\r?\n
useRegex=true
HI Mahesh,
I just tried it now but it did not work out…
Could you please help me further?
Strange! I tried on my machine before posting it, can you attach a sample package or the FF string here.
Try to check the regex expression and extend it as per your FF content, there might be multiple line breaks.
Yes, there are multiple line breaks…
Need to modify regex for the multiple line breaks
Hi All,
I just used pub.string:replace service with below inputs.
It works as expected even with multiple line breaks
inString:
A,B,C,D
A,B,C,D
A,B,C,D
A,B,C,D
searchString: \n\s
useRegex: true
value:
A,B,C,D
A,B,C,D
A,B,C,D
A,B,C,D