Last active
January 2, 2016 16:19
-
-
Save zzuhan/8328971 to your computer and use it in GitHub Desktop.
一些js中的正则
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
// seajs中正则,包括一些注释正则 | |
var REQUIRE_RE = /"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g; | |
// 注释正则 | |
var rComment = /\/\/.*|\/\*[\S\s]*?\*\//g; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment