[scribblings] bad group example

This commit is contained in:
ben 2015-12-16 03:31:22 -05:00
parent e91b79481e
commit 8a797f016d
2 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,7 @@
(define-for-syntax (group-error str reason) (define-for-syntax (group-error str reason)
(raise-argument-error (raise-argument-error
errloc-key errloc-key
(format "Valid regexp pattern (contains unmatched ~a)" reason) (format "Valid regexp pattern (unmatched ~a)" reason)
str)) str))
;; Dispatch for counting groups ;; Dispatch for counting groups

View File

@ -70,6 +70,7 @@ In other words, the result is one string for the matched substring and an unknow
(U #f (List String String))) (U #f (List String String)))
(ann (regexp-match: #"(la(m*)bda)" #"lam") (ann (regexp-match: #"(la(m*)bda)" #"lam")
(U #f (List Bytes Bytes Bytes))) (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. @emph{Note:} the regular expression @racket{|} operator is not currently supported because it can nullify some groups.