Created
June 20, 2017 10:20
-
-
Save bperel/b75d9d18dce354908dbdb6a839bcc6da to your computer and use it in GitHub Desktop.
Regexes
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
(/(\$[a-zA-Z0-9]+) = (new [^;]+;)\n([ ]{4})\3\1->/g,'$1 = $2\n$3$3$1\n$3$3$3->') | |
(/(\$[a-zA-Z0-9]+)\n([ ]{4})(\2\2->(?!persist)[^;]+);\n\2\2\1->/g,'$1\n$2$3\n$2$2$2->') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment