[ale] Regular Expression.

JK jknapka at kneuro.net
Tue Sep 4 15:21:44 EDT 2007


Michael B. Trausch wrote:

> For the life of me, I cannot figure out a regex that will do what I want
> it to do.  I want to change every instance of the string:
> 
> 	$_GET['varname']
> 
> to:
> 
> 	get_get('varname')

If I were facing this task, I'd probably use an Emacs or
vi keystroke macro.

OTOH if this had to be done over many files, sed may be
the more effective choice.

--JK

^X(^S$_GET<Backspace>*5get_get<Del>^S]<Backspace>)^X)^U1000000^X^E
or something like that...

-- 
"What can be asserted without evidence can also be
dismissed without evidence." -- Christopher Hitchens



More information about the Ale mailing list