You are here: PSPad forum > English discussion forum > Help replacing

Help replacing

#1 Help replacing

Posted by: Galia | Date: 2022-10-19 09:13 | IP: IP Logged

Hi, i want to make a replacement in a text but i dont know how to do it.

If a line ends with character / then replace it with characters /*

Thank you very much.

Options: Reply | Quote | Up ^


#2 Re: Help replacing

Posted by: pspad | Date: 2022-10-19 09:19 | IP: IP Logged

Search: /$
Replace: /*
[x]Regular expressions

Options: Reply | Quote | Up ^


#3 Re: Help replacing

Posted by: Galia | Date: 2022-10-19 09:46 | IP: IP Logged

Thank you

Edited 1 time(s). Last edit at 2022-10-19 09:49 by Galia.

Options: Reply | Quote | Up ^


#4 Re: Help replacing

Posted by: pspad | Date: 2022-10-19 09:59 | IP: IP Logged

Hello

You wrote "/" but you need to replace backslash "\"
Backslash need to be escaped

in your case:
Search: (\\)$
Replace: \*
[x]Regular expressions

Options: Reply | Quote | Up ^


#5 Re: Help replacing

Posted by: Galia | Date: 2022-10-19 11:14 | IP: IP Logged

pspad:
You wrote "/" but you need to replace backslash "\"
Backslash need to be escaped

in your case:
Search: (\\)$
Replace: \*
[x]Regular expressions

You're right, works perfectly. Thanks again

Options: Reply | Quote | Up ^






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