You are here: PSPad forum > English discussion forum > another regex error
Posted by: kenking | Date: 2019-04-30 15:27 | IP: IP Logged
I am extracting text from an Excel file, then in PSPAD, I need to replace, using regular expressions, the tab character(\t) with the newline (\n) character. With past versions of PSPAD this has not been a problem. Since I have installed the latest version this function has not preformed correctly. When there a multiple tab characters only a few get replaced and I have to do additional Replace functions until all have been replaced. When I have hundreds this is quite frustrating.
Am I missing something or is this indeed an bug?
How can I get around this?
Posted by: vbr | Date: 2019-04-30 18:08 | IP: IP Logged
kenking:I am extracting text from an Excel file, then in PSPAD, I need to replace, using regular expressions, the tab character(\t) with the newline (\n) character. With past versions of PSPAD this has not been a problem. Since I have installed the latest version this function has not preformed correctly. When there a multiple tab characters only a few get replaced and I have to do additional Replace functions until all have been replaced. When I have hundreds this is quite frustrating.Am I missing something or is this indeed an bug?
How can I get around this?
Hi, for replacing with \n in PSPad a workaround is needed: place the caret/cursor at the end of the text and in the replace dialog, set the search direction to (o) Backwards
and perform the replacement from the end to the beginning of the text.
hth,
vbr
Posted by: Andreas | Date: 2019-04-30 21:07 | IP: IP Logged
Maybe you have luck with the backward trick but I do not remember that replacing with newline ever worked.
Try to use the "Multiline Search / Replace" script also called phreplace by www.phdesign.com.au. You will find installation help here in the forum.
With this tool you can simply enter a newline with the keyboard or a tab with shift+tab - \n and \t are not needed with this script.
Posted by: kenking | Date: 2019-05-02 18:18 | IP: IP Logged
thanks vbr
your suggestion worked fine
Editor PSPad - freeware editor, © 2001 - 2023 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR