Merge pull request #2602 from joaquinelio/patch-4

typo
This commit is contained in:
Ilya Kantor 2021-05-16 11:42:17 +03:00 committed by GitHub
commit 4177be3612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -242,7 +242,7 @@ And in the original example `pattern:^(\w+\s?)*$` we may want to forbid backtrac
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.
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.
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.
There are also so-called "atomic capturing groups" - a way to disable backtracking inside parentheses.