Skip to content

Instantly share code, notes, and snippets.

@m4tm4t
Last active December 15, 2015 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4tm4t/5208178 to your computer and use it in GitHub Desktop.
Save m4tm4t/5208178 to your computer and use it in GitHub Desktop.
Regex for sublime text that replace css background url for Rails
/*
FIND WITH: url\(images\/([a-zA-Z\w+\-.]+)\)?
*/
div {
background: url(images/ui-bg_glass_75_ffffff_1x400.png);
}
/*
REPLACE WITH: url(image-path("\1"))
*/
div {
background: url(image-path("ui-bg_glass_75_ffffff_1x400.png"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment