From 8fae6f71f0bde43369c0476e88f718a2955d17f2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 16 Oct 2003 11:49:01 +0000 Subject: [PATCH] . original commit: 2d20748107b752704a44294b0b2b115176ec4e9a --- collects/net/mime-util.ss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/net/mime-util.ss b/collects/net/mime-util.ss index 597a0655fb..88b44102e2 100644 --- a/collects/net/mime-util.ss +++ b/collects/net/mime-util.ss @@ -105,13 +105,13 @@ (lambda (str) (regexp-replace re:right-spaces str ""))) - (define re:comments (regexp "\\(.*\\)")) + (define re:comments (regexp "^[^\"]*(\"[^\"]*\")*[^\"]*(\\(.*\\))")) (define trim-comments (lambda (str) (let* ((positions (regexp-match-positions re:comments str))) (if positions - (string-append (substring str 0 (caar positions)) - (substring str (cdar positions) (string-length str))) + (string-append (substring str 0 (caaddr positions)) + (substring str (cdaddr positions) (string-length str))) str)))) (define lowercase