I have regular expression
(?<=\\s)(?:#sidebar-right-1|#BlogArchive1|#ArchiveList|#BlogArchive1_ArchiveList|#PopularPosts)(?=\\s|{)
I got syntax error invalid regex group. Where is problem?
I applied it like this:
rules[r].selectorText.match(new RegExp(ids, 'gm'))
看来javascript的正则表达式不支持肯定的后向断言(即(?<=\\s)
部分)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.