Update regex.md

This commit is contained in:
succyag
2023-07-16 21:46:01 +08:00
committed by GitHub
parent a342ebff14
commit ece963d6ab
+1 -1
View File
@@ -376,7 +376,7 @@ JavaScript 语言的正则表达式,只支持先行断言(lookahead)和先
```javascript
/(?<=\$)\d+/.exec('Benjamin Franklin is on the $100 bill') // ["100"]
/(?<!\$)\d+/.exec('its is worth about €90') // ["90"]
/(?<!\$)\d+/.exec('its worth about €90') // ["90"]
```
上面的例子中,“后行断言”的括号之中的部分(`(?<=\$)`),也是不计入返回结果。