Skip to content

Instantly share code, notes, and snippets.

@plentz
Created June 28, 2011 22:40
Show Gist options
  • Save plentz/1052433 to your computer and use it in GitHub Desktop.
Save plentz/1052433 to your computer and use it in GitHub Desktop.
html_tag.gsub(/class="(?<interval>[^"]*)"/, "class=\"\\k<interval> error\"")
html_tag.gsub(/<(?<tag>input|textarea|select|label)/, "<\\k<tag> class=\"error\"")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment