Ask Your Question
1

Remove new line

asked 2019-04-08 14:04:42 -0500

abhinav gravatar image

updated 2019-04-08 14:24:15 -0500

metadaddy gravatar image

I am applying the field remover on a delimited file. This creates an issue with columns which contain multiline data (i.e. separated by CRLF).

Can you please help parse this value?

I could try with field replacer and replace CRLF for a column but I'm not sure how to write the string replacement value -

${str:replaceAll(f:value(), '\n', '')}

But i cant get it working correctly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-08 14:25:33 -0500

metadaddy gravatar image

You're almost there - you just need to use double backslash in the regular expression:

${str:replaceAll(f:value(), '\\n', '')}
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-04-08 14:04:42 -0500

Seen: 42 times

Last updated: Apr 08