You are here: PSPad forum > English discussion forum > search and replace

search and replace

#1 search and replace

Posted by: haltman | Date: 2013-07-11 17:13 | IP: IP Logged

Hi everybody!
I've a list like this:


$name1,
$name2,
$name3,

I'd like to replace comma with =rs["value"]; where value must be the code before comma to get following result:


$name1=rs["name1"];
$name2=rs["name2"];
$name3=rs["name3"];

can I use regular expression to it?

Thanks in advance
ciao
h.

Options: Reply | Quote | Up ^


#2 Re: search and replace

Posted by: pspad | Date: 2013-07-11 18:00 | IP: IP Logged

Yes, you can use regular espressions.
Search: \$(\w+)
Replace: $$1=rs["$1"];

Options: Reply | Quote | Up ^


#3 Re: search and replace

Posted by: haltman | Date: 2013-07-11 18:05 | IP: IP Logged

Thank you very much for help! smiling smiley

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