looking for some solutions? You are welcome.

SOLVED: javascript regular expression lookbehinds alternative [duplicate]


This question already has an answer here:

This is my problem online regex tester.
I want to match '[' and ']' but do not match '[{' and ']}'
I have tried lookbehind and it works, like below
let regex = /\[(?!{)|(?<!})\]/g;
But javascript doesn't support look-behind syntax, so how can I do or some alternative methods?

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots

No comments: