Skip to content

Commit ddbbfe9

Browse files
authored
Merge pull request #395 from odsantos/update-en-catastrophic-backtracking
Update "Catastrophic backtracking" article
2 parents 8b0dd6c + 3fb29f4 commit ddbbfe9

File tree

1 file changed

+1
-1
lines changed
  • 9-regular-expressions/15-regexp-catastrophic-backtracking

1 file changed

+1
-1
lines changed

9-regular-expressions/15-regexp-catastrophic-backtracking/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ alert( "JavaScript".match(/(?=(\w+))\1Script/)); // null
283283
We can put a more complex regular expression into `pattern:(?=(\w+))\1` instead of `pattern:\w`, when we need to forbid backtracking for `pattern:+` after it.
284284

285285
```smart
286-
There's more about the relation between possessive quantifiers and lookahead in articles [Regex: Emulate Atomic Grouping (and Possessive Quantifiers) with LookAhead](http://instanceof.me/post/52245507631/regex-emulate-atomic-grouping-with-lookahead) and [Mimicking Atomic Groups](http://blog.stevenlevithan.com/archives/mimic-atomic-groups).
286+
There's more about the relation between possessive quantifiers and lookahead in articles [Regex: Emulate Atomic Grouping (and Possessive Quantifiers) with LookAhead](https://instanceof.me/post/52245507631/regex-emulate-atomic-grouping-with-lookahead) and [Mimicking Atomic Groups](https://blog.stevenlevithan.com/archives/mimic-atomic-groups).
287287
```
288288

289289
Let's rewrite the first example using lookahead to prevent backtracking:

0 commit comments

Comments
 (0)