Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created February 1, 2013 20:52
Show Gist options
  • Save smsohan/4694064 to your computer and use it in GitHub Desktop.
Save smsohan/4694064 to your computer and use it in GitHub Desktop.
Regular expression to replace url("/images/hello.png") with url(<%= asset_path 'hello.png' %>) used for Rails 3.2 upgrade to use asset pipeline
url\("*\s*\/images\/([^"^)]*)"*\s*\)
url(<%= asset_path '\1' %>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment