diff --git a/content/docs/searching.md b/content/docs/searching.md index 030b7597..9fa61d7a 100644 --- a/content/docs/searching.md +++ b/content/docs/searching.md @@ -768,13 +768,14 @@ Anchors match a zero-length position in the line, rather than a particular chara * For negative ℕ, groups are counted backwards relative to the last group, so that `\g{-1}` is the last matched group, and `\g{-2}` is the next-to-last matched group. - * Please, note the difference between absolute and relative backreferences. For instance, an exact four-letters word palindrome can be matched with : * the regex `(?-i)\b(\w)(\w)\g{2}\g{1}\b`, when using absolute (positive) coordinates * the regex `(?-i)\b(\w)(\w)\g{-1}\g{-2}\b`, when using relative (negative) coordinates + * `\g` and `\k` are functionally synonymous prefixes for _extended backreferences._ There is no semantic difference in Boost's implementation. They coexist for syntax-compatibility/historical reasons. + * `\g{name}`, `\g`, `\g'name'`, `\k{name}`, `\k` or `\k'name'` ⇒ _Named Backreference_: The string matching the subexpression named _name_. (As with the Numbered Backreferences above, these Named Backreferences are used to refer to the capture group contents only in the search/match expression; see the [Substitution Escape Sequences](#substitution-escape-sequences) for how to refer to capture groups in substitutions/replacements.)