You are here: PSPad forum > English discussion forum > finding CR /x0d

finding CR /x0d

#1 finding CR /x0d

Posted by: kenking | Date: 2012-07-20 15:53 | IP: IP Logged

I am relatively new to PSPad and like what I've seen so far. However, I'm having problems with finding the CR /x0d character.

In the past I've used Word Perfect to manipulate a TXT file exported from Excel. I don't need many of Word Perfects features and I want to use PSPad because it has more features that I need.

In WP I can do a Replace on a CR to insert text at either the end of a record or the beginning of the next record. In the help for PSPad it says I can find the regular expression \r or \x0d. However, I have not been able to do this successfully.

I've manually added CR to the file, I've changed options in the Settings menu and nothing helps.

I have done searchs on \t and various \x expressions so I think I understand how it's done I just can't find the CR.

What do I need to do get this to work? I hate to have to stay with WP just for this one feature.

Options: Reply | Quote | Up ^


#2 Re: finding CR /x0d

Posted by: vbr | Date: 2012-07-21 04:07 | IP: IP Logged

kenking:
I am relatively new to PSPad and like what I've seen so far. However, I'm having problems with finding the CR /x0d character.
...

Hi,
the search and replace engine in PSPad only works on single lines, hence you can't repace a linebreak itself (you can replace with a newline though).

You can search for line beginning end ending using ^ and $ in regexp; however, you cannot match over the line boundary.

There are script addons enabling for searching and replacing in multiline mode (also using \r\n), but have themselves specific limitations.
see:
forum.pspad.com

For some very simple replacements it might be possible to use the hexadecimal mode built in PSPad (be sure to directly open in hex as switching the view for an open file uses it's internally converted form and not the original data file).

hth,
vbr

Edited 1 time(s). Last edit at 2012-07-21 04:07 by vbr.

Options: Reply | Quote | Up ^


#3 Re: finding CR /x0d

Posted by: kenking | Date: 2012-07-23 14:29 | IP: IP Logged

Thanks,

I've been using WP to do this for so long, doing replace on CR, that I didn't even think to do a replacement on ^ or $, which does exactly what I want.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR