Skip to content

Commit 4177be3

Browse files
authored
Merge pull request #2602 from joaquinelio/patch-4
typo
2 parents 6ad8930 + fafab82 commit 4177be3

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
@@ -242,7 +242,7 @@ And in the original example `pattern:^(\w+\s?)*$` we may want to forbid backtrac
242242

243243
Modern regular expression engines support possessive quantifiers for that. Regular quantifiers become possessive if we add `pattern:+` after them. That is, we use `pattern:\d++` instead of `pattern:\d+` to stop `pattern:+` from backtracking.
244244

245-
Possessive quantifiers are in fact simpler than "regular" ones. They just match as many as they can, without any backtracking. The search process without bracktracking is simpler.
245+
Possessive quantifiers are in fact simpler than "regular" ones. They just match as many as they can, without any backtracking. The search process without backtracking is simpler.
246246

247247
There are also so-called "atomic capturing groups" - a way to disable backtracking inside parentheses.
248248

0 commit comments

Comments
 (0)