Created
September 15, 2012 18:21
-
-
Save syndicut/3729149 to your computer and use it in GitHub Desktop.
Regexp to replace hook do end ruby block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^( *)<%= hook :([^ ,]+).*do %>(((?!^\1<% end %>).|\n)+)^\1<% end %> | |
\1<div data-hook="\2">\3\1</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment