main
Matthew Butterick 7 years ago
parent 236a7cdc1a
commit be5a72d15e

@ -15,7 +15,9 @@
(define escaped-chars '(#\newline #\return #\tab #\backspace #\page #\( #\) #\\))
(define escaped-char-strings '("\\n" "\\r" "\\t" "\\b" "\\f" "\\(" "\\)" "\\\\"))
;; note: unlike nodejs, escapableRe does not have `g` option built in
;; so use it with regexp-replace* not regexp-replace
(field [escapableRe
(regexp (format "[~a]" (regexp-quote (list->string escaped-chars))))])

Loading…
Cancel
Save