Terry Sahaidak
Terry Sahaidak

Reputation: 513

python to javascript regex

Can someone help me to fix this regex to use in javascript?

(?<!\\\\)#\\{{1,2}

Regex tester said:

SyntaxError: Invalid regular expression: /(?:((?<!\\)#\{{1,2})|(.))/: Invalid group

Thanks.

Upvotes: 0

Views: 86

Answers (1)

wasikuss
wasikuss

Reputation: 969

maybe /(?:((?!\\)#\{{1,2})|(.))/. in python negative lookback is (?<!...) but in javascript is (?!...) just remove <

Upvotes: 1

Related Questions