Skip to content

Instantly share code, notes, and snippets.

@staycreativedesign
Created May 1, 2019 05:24
Show Gist options
  • Save staycreativedesign/a64f05a06685d6e43ff993f9d9b8c897 to your computer and use it in GitHub Desktop.
Save staycreativedesign/a64f05a06685d6e43ff993f9d9b8c897 to your computer and use it in GitHub Desktop.
regex
"url(\"https://www.premierleague.com/resources/prod/c88a89e-636/i/sprites/[email protected]\")"
to
"https://www.premierleague.com/resources/prod/c88a89e-636/i/sprites/[email protected]"
@nilbus
Copy link

nilbus commented May 1, 2019

https://rubular.com/r/Vj9G3UmG4tQftA

string.sub(/^url\("|"\)$/, "")

Is this what you're looking for?

@staycreativedesign
Copy link
Author

the last \ after .png is still there!

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