Reputation: 3611
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'))
Upvotes: 1
Views: 2223
Reputation: 23850
It appears that javascript's regexs do not support positive lookbehind assertions (i.e. the (?<=\s)
part).
Upvotes: 5