Skip to content

Instantly share code, notes, and snippets.

@dropmeaword
Created January 4, 2013 22:56
Show Gist options
  • Save dropmeaword/4458263 to your computer and use it in GitHub Desktop.
Save dropmeaword/4458263 to your computer and use it in GitHub Desktop.
Explanation of how to write a script that will replace all of goteo's call to Text::get with the adecuate Text::_ call.
regex: (Text::get) -> replace with: _
regex: (?<=Text::get\(\')(.*)(?=\'\);) returns as match the contents of the id string used as a param, then you look it up in the db and replace it with the actual value. -> lu = lookup(match[0]) /s/match[0]/lu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment