RegEx help: match carriagereturn & linefeed

Questions about XML that are not covered by the other forums should go here.
leefranke
Posts: 2
Joined: Tue Apr 10, 2018 3:49 pm

RegEx help: match carriagereturn & linefeed

Post by leefranke » Tue Apr 10, 2018 3:54 pm

I need to remove all the carriage-return and linefeeds (hex: 0D & 0A) from a file and \r \n doesn't seem to work.

If I could get some assistance with this, it would be appreciated.

thanks,

lee

Radu
Posts: 6582
Joined: Fri Jul 09, 2004 5:18 pm

Re: RegEx help: match carriagereturn & linefeed

Post by Radu » Wed Apr 11, 2018 9:11 am

Hi,

In the Find/Replace in Files dialog there is a "Regular Expression" checkbox. If you check it, you can for example search for:

Code: Select all

(\r|\n)
and replace it with nothing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

leefranke
Posts: 2
Joined: Tue Apr 10, 2018 3:49 pm

Re: RegEx help: match carriagereturn & linefeed

Post by leefranke » Wed Apr 11, 2018 3:57 pm

The parenthesis is what I was missing!

Thanks,

lee

Post Reply