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.
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.
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.
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).
Edited 1 time(s). Last edit at 2012-07-21 04:07 by vbr.
Posted by: kenking | Date: 2012-07-23 14:29 | IP: IP Logged
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.