Page 1 of 1

Please help me very urgent regex in edit plus..

Posted: Sat Dec 22, 2007 1:20 pm
by anirbanb2004
I am trying a simple regular expression to find and replace following in any document. 'm using EditPlus.

String to find:
request("xxxxx")

where xxxxx can be anything; so white space request(" anything ")

and to replace it with
sanatize(request("xxxxx"))
where xxxxx can be anything; so white space sanatize(request(" anything "))
Please help it is very urgent.. :(

Posted: Sat Dec 22, 2007 2:07 pm
by superdezign
Simple? How simple? You can just do a regular find/replace and find "request(", replace it with "sanitize(request(" and add the extra parentheses at the end. Or, better yet, make sanitize() a part of the request() method.

Posted: Sat Dec 22, 2007 4:27 pm
by vigge89
Search:

Code: Select all

(request\(".+"\))
Replace:

Code: Select all

sanatize(\1)
Note that you've misspelled sanitize.

Posted: Mon Dec 24, 2007 1:47 am
by anirbanb2004
Thanks