Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why this regular is not recognized? #54

Open
ccl20210529 opened this issue May 29, 2021 · 3 comments
Open

Why this regular is not recognized? #54

ccl20210529 opened this issue May 29, 2021 · 3 comments

Comments

@ccl20210529
Copy link

(?<=\d{6})\d{10}(?=.{2})

@wzhck
Copy link

wzhck commented Jun 8, 2021

(?<=\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):

image

@alexetgus
Copy link

The Javascript used is very minimalist. It does not dwell on the particularities of PCRE Regex...

@liudongmiao
Copy link

demo: https://jianyu.io/regulex/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants