You are here: PSPad forum > English discussion forum > search not repeated dollar sign

search not repeated dollar sign

#1 search not repeated dollar sign

Posted by: smr | Date: 02/01/2017 13:49 | IP: IP Logged

Hello,

In a javascript file, I have to replace all single $ character by $$.

I succeed to do that, except for some configurations like
if($('descendimg1'))
where the $ has not been replaced by $$

So now I want to replace these single left $, but not replace $ in $$. I tried this regex
(?<!\$)\$(?!\$)
that is effective on regex101.com

but not effective in my Pspad version 4.6.1 (2730) because I get an error message "wrong regular expression.

Thanks for any help

Options: Reply | Quote | Up ^


#2 Re: search not repeated dollar sign

Posted by: smr | Date: 02/01/2017 14:07 | IP: IP Logged

Sorry I found a solution with these regex

find ([^\$])(\$)([^\$])

replace $1\$\$$3

Options: Reply | Quote | Up ^






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