Skip to content

Instantly share code, notes, and snippets.

@paulstelzer
Created December 31, 2018 09:06
Show Gist options
  • Save paulstelzer/acbb6831fbef003afd4c8a567fc2c0de to your computer and use it in GitHub Desktop.
Save paulstelzer/acbb6831fbef003afd4c8a567fc2c0de to your computer and use it in GitHub Desktop.
Regex test
// OLD
myRecipe.title = trimString($('.recipe__intro .page-title').text());
// NEW
myRecipe.title = this.getText('.recipe__intro .page-title');
@paulstelzer
Copy link
Author

paulstelzer commented Dec 31, 2018

Search for:
trimString\(\$(.+?)\.text\(\)\)

Replace with:
this.getText$1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment