Regex replace template - advanced search plugin for gedit

I am trying to replace all instances

$offer->variablenames 

from

 $offer['variablenames'] 

Is it possible? I am using the extended find plugin for gedit.

These are just heiroglyphs for me ... I would really like the help.
Thanks

+4
source share
2 answers

Find what:

\$offer\-\>([a-zA-Z0-9_]*)

Replaced by:

$offer['\1']

Make sure the Regular expression checkbox is Regular expression .

+11
source

I am not sure what the extended syntax of the find plugin is. In vim, I would use s/$offer->\(.*\)/$offer['\1']/g

+1
source

Source: https://habr.com/ru/post/1396889/


All Articles