From fd8c2b2c2021ea633556003004d633422b4877a8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 8 Nov 2018 17:51:27 -0700 Subject: [PATCH] Guide on regexps: clarify that {m}? is the same as {m} As noted by Jussi Salmela. --- pkgs/racket-doc/scribblings/guide/regexp.scrbl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/racket-doc/scribblings/guide/regexp.scrbl b/pkgs/racket-doc/scribblings/guide/regexp.scrbl index 6cfa4071d4..00bf0611bc 100644 --- a/pkgs/racket-doc/scribblings/guide/regexp.scrbl +++ b/pkgs/racket-doc/scribblings/guide/regexp.scrbl @@ -500,10 +500,13 @@ needed to ensure an overall match. (regexp-match #rx"<.*?>" " ") ] -The non-greedy quantifiers are respectively: @litchar{*?}, -@litchar{+?}, @litchar{??}, @litchar["{"]@math{m}@litchar["}?"], -@litchar["{"]@math{m}@litchar{,}@math{n}@litchar["}?"]. Note the two -uses of the metacharacter @litchar{?}. +The non-greedy quantifiers are @litchar{*?}, @litchar{+?}, +@litchar{??}, @litchar["{"]@math{m}@litchar["}?"], and +@litchar["{"]@math{m}@litchar{,}@math{n}@litchar["}?"], although +@litchar["{"]@math{m}@litchar["}?"] is always the same as +@litchar["{"]@math{m}@litchar["}"]. Note that the metacharacter +@litchar{?} has two different uses, and both uses are represented in +@litchar{??}. @; ----------------------------------------