Skip to content

Instantly share code, notes, and snippets.

@kevindb
Last active August 29, 2015 14:19
Show Gist options
  • Save kevindb/c32e0505cd206eb9c6b2 to your computer and use it in GitHub Desktop.
Save kevindb/c32e0505cd206eb9c6b2 to your computer and use it in GitHub Desktop.
Find HTML tags with capitals and replace with all lowercase
Expression: (?:(</?[A-Za-z_]*[A-Z]+[A-Za-z_]*[>|\s]|\s(?:GREATER\sTHAN(?:\sOR\sEQUAL TO)?|LESS\sTHAN(?:\sOR\sEQUAL\sTO)?|N?EQ|[LG]TE?|AND|OR|(?:NOT\s)?EQUAL|DOES\sNOT\sCONTAIN|(?:IS\s)?NOT|IS|CONTAINS|XOR|EQV|IMP)\s))
Replace: \L$1
@kevindb
Copy link
Author

kevindb commented May 11, 2015

First half of pattern finds HTML tags with uppercase names. Second half finds uppercase ColdFusion operators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment