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

正则表达式 #23

Open
Yang03 opened this issue Aug 21, 2018 · 0 comments
Open

正则表达式 #23

Yang03 opened this issue Aug 21, 2018 · 0 comments

Comments

@Yang03
Copy link
Owner

Yang03 commented Aug 21, 2018

前向声明

?=
'abcacad'.replace(/a(?=b)/g,'*') //*bcacad

反前向声明

'abcacad'.replace(/a(?!b)/g,'*') //abc*c*d
let str="123456789";
let  re=/(?=(?!(\b))(\d{3})+$)/g
str=str.replace(re, ",")
console.log(str)

\b 是单词边界

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

1 participant