Search code examples
regexgedit

Regex replace pattern - advanced find plugin for Gedit


I'm trying to replace all instances of

$offer->variablenames

with

$offer['variablenames']

Is this possible? I'm using advanced find plugin for gedit.

It's just heiroglyphs to me... Would very much appreciate help.
Thanks


Solution

  • Find what:

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

    Replace with:

    $offer['\1']

    Make sure to have Regular expression checkbox checked.