A strange question of regular matching?

Code first:

if(/(\module\/(?:.+[^\.html]))/.test("./src/module/comment/details.html")){
    console.log(RegExp.$1) //module/comment/details
}

if(/(\module\/(?:.+[^\.js]))/.test("./src/module/comment/details.js")){
    console.log(RegExp.$1) //module/comment/detail
}

shouldn"t all output / module/comment/details?


[^] reverse match
[^ abc] match not abc a character
/ [^ js] + / .test ('as') matches a will not match s
[^\ .html] match not . Html A character such as a , b , e all passes through t and does not match the five connected words
which are not .html , so your first. / src/module/comment/commen t .html matches t so the match ends with
other similar

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30754-2bd12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30754-2bd12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?