From 3b45b7165ecdb8afd63481756283a1dfd63460f2 Mon Sep 17 00:00:00 2001 From: Dorai Sitaram Date: Thu, 4 Dec 2003 20:06:36 +0000 Subject: [PATCH] pregexp-quote should quote ^ and $ original commit: 5044a024eeff810c7d00773a2b6f06a308acb22e --- collects/mzlib/pregexp.ss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/mzlib/pregexp.ss b/collects/mzlib/pregexp.ss index 60849be..0fd915f 100644 --- a/collects/mzlib/pregexp.ss +++ b/collects/mzlib/pregexp.ss @@ -15,7 +15,7 @@ pregexp-quote *pregexp-comment-char*) -;Configured for Scheme dialect plt by scmxlate, v 1a6, +;Configured for Scheme dialect plt by scmxlate, v 2003-08-24, ;(c) Dorai Sitaram, ;http://www.ccs.neu.edu/~dorai/scmxlate/scmxlate.html @@ -674,7 +674,9 @@ (loop (- i 1) (let ((c (string-ref s i))) - (if (memv c '(#\\ #\. #\? #\* #\+ #\| #\[ #\] #\{ #\} #\( #\))) + (if (memv + c + '(#\\ #\. #\? #\* #\+ #\| #\^ #\$ #\[ #\] #\{ #\} #\( #\))) (cons #\\ (cons c r)) (cons c r))))))))