We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let str = 'qwert&code=1243&qerfvs=6577'; str.replace(/(?<=code=)\d+/,'4321'); // "qwert&code=4321&qerfvs=6577"
"(?<!(T|t)he\s)(cat)" => The cat sat on cat.
"(T|t)he(?=\sfat)" => The fat cat sat on the mat. // 匹配 紧跟fat的 The或the
"(T|t)he(?!\sfat)" => The fat cat sat on the mat. // 匹配文本后面不紧跟fat的The 或the
The text was updated successfully, but these errors were encountered:
No branches or pull requests
正则表达式--断言
Positive Lookbehind
(?<=) #断言要匹配的文本前缀
Negative Lookbehind
(?<!) #断言位置不能匹配的文本前缀
Positive Lookahead
(?=) #断言要匹配的文本后缀
Negative Lookahead
(?!) #断言位置不能匹配的文本后缀
总结
The text was updated successfully, but these errors were encountered: