Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

seajs源码中的这句正则是否写错了? #1122

Closed
switer opened this Issue · 2 comments

2 participants

guankaishe army8735
guankaishe
var DIRNAME_RE = /[^?#]*\//
// "a/b/c.js?t=123#xx/zz") ==> "a/b/"

?在正则表达式中的含义让人迷惑,正确的写法应该:/[^\?#]*\//
https://github.com/seajs/seajs/blob/master/dist/sea-debug.js#L103

army8735
Owner

perl风格的正则表达式中,[]字符集中可以省略转义符

guankaishe

@army8735 验证过javascript也是支持这种写法的,thanks~!

army8735 army8735 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.