regulex
regulex copied to clipboard
Why this regular is not recognized?
(?<=\d{6})\d{10}(?=.{2})
(?<=\d{6})
is a lookbehind ((?<=)
or (?<!)
), which is NOT supported by JavaScript. In fact JavaScript can support your lookahead(?=.{2})
((?=)
or (?!)
).
You can use (?=\d{6})\d{10}(?=.{2})
instead (ref: javascript-regex-look-behind-alternative):
The Javascript used is very minimalist. It does not dwell on the particularities of PCRE Regex...
demo: https://jianyu.io/regulex/