Skip to content

Instantly share code, notes, and snippets.

@albus522
Created June 16, 2010 15:12
Show Gist options
  • Save albus522/440826 to your computer and use it in GitHub Desktop.
Save albus522/440826 to your computer and use it in GitHub Desktop.
# Regex to find <% ... %> which likely should be <%= ... %>
# Excludes:
# <% @.*
# <% end.*
# <% else.*
# <% elsif.*
# <% if[ (].*
# <% unless.*
/<% ([^e@ui]|e[^nl]|en[^d]|el[^s]|els[^ei]|elsi[^f]|u[^n]|un[^l]|unl[^e]|unle[^s]|unles[^s]|i[^f]|if[^ (])/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment