Page 1 of 1

Replace Text Problem (bug?)

Posted: Wed Jul 01, 2009 9:17 am
by Jose Manuel
find $_SESSION[id] -> replace with -> funcion($_SESSION[some])
cause, duplication code en my files.

ver. 1.1-2

Thanks.

Posted: Thu Jul 02, 2009 9:43 am
by DV
Using $_ in a replace expression causes a copy of the match to be inserted. This shouldn't happen in non-regex mode (and will be fixed in future versions)
As a workaround use a double dollar ($$) in the replace string and this should mean the dollar character is taken literally. Eg-

Find: $_SESSION[id]
Replace: funcion($$_SESSION[some])

Posted: Thu Jul 02, 2009 5:46 pm
by Jose Manuel
Thanks for your answer!