Created
July 2, 2015 21:51
-
-
Save thebuilder/550424d82d2c7c0ec99f to your computer and use it in GitHub Desktop.
Angular Module RegEx
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
//Find angular.module definition. $2 contains the modules defined. Append with replacing like: | |
// $1$2,\n require('newModule')$3 | |
/(angular.module\(.+\[)(.*)(\]\))/g | |
//Capture all methods called on the angular module. Allows you to append to it. with $& | |
/(?:angular.module\(.+\))(\s+\..+\))+/g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment