News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Regular expression search/replace

Started by Revvy, June 16, 2006, 02:48:18 AM

Previous topic - Next topic

Revvy

How am I supposed to use the regular expression option for find/replace?  I have this block of code:

if(max(state->get_svar("sel_x"), state->get_svar("sel_x2")) < (s32)(state->get_svar("view_x") + state->get_uvar("view_width")))
{
if(max(state->get_svar("sel_x"), state->get_svar("sel_x2")) < state->get_svar("view_x"))
{
w = 0;
draw_right = false;
}
else
w = max(state->get_svar("sel_x"), state->get_svar("sel_x2")) - min(state->get_svar("sel_x"), state->get_svar("sel_x2")) + 1;
}


and I tried to use this search regex:

state->get_svar\("(.+)"\)

and this replace regex:

\1

Nothing happened.  I tried just searching for the first, and it didn't find anything.  Why isn't this working?

ps. latest nightly build
Cheers,
Revvy

Ceniza

Text to search for: state->get_svar("\([^"]+\)")
Replace with: \1