Last active
August 29, 2015 14:19
-
-
Save kevindb/c32e0505cd206eb9c6b2 to your computer and use it in GitHub Desktop.
Find HTML tags with capitals and replace with all lowercase
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
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First half of pattern finds HTML tags with uppercase names. Second half finds uppercase ColdFusion operators.