From 8a797f016dff8d634a6815f9b704bae29e55563b Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 16 Dec 2015 03:31:22 -0500 Subject: [PATCH] [scribblings] bad group example --- regexp.rkt | 2 +- scribblings/trivial.scrbl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/regexp.rkt b/regexp.rkt index 1d585b7..5eda021 100644 --- a/regexp.rkt +++ b/regexp.rkt @@ -106,7 +106,7 @@ (define-for-syntax (group-error str reason) (raise-argument-error errloc-key - (format "Valid regexp pattern (contains unmatched ~a)" reason) + (format "Valid regexp pattern (unmatched ~a)" reason) str)) ;; Dispatch for counting groups diff --git a/scribblings/trivial.scrbl b/scribblings/trivial.scrbl index bf460e7..333b5e4 100644 --- a/scribblings/trivial.scrbl +++ b/scribblings/trivial.scrbl @@ -70,6 +70,7 @@ In other words, the result is one string for the matched substring and an unknow (U #f (List String String))) (ann (regexp-match: #"(la(m*)bda)" #"lam") (U #f (List Bytes Bytes Bytes))) + (regexp-match: "(bad))group" "") ] @emph{Note:} the regular expression @racket{|} operator is not currently supported because it can nullify some groups.