From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.bugs Subject: Re: regexp-exec fails for long strings Date: Thu, 25 Apr 2002 23:47:13 +0200 Sender: bug-guile-admin@gnu.org Message-ID: <20020425214713.GA19857@www> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019771124 8400 127.0.0.1 (25 Apr 2002 21:45:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 25 Apr 2002 21:45:24 +0000 (UTC) Cc: bug-guile@gnu.org, guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 170r3M-0002BM-00 for ; Thu, 25 Apr 2002 23:45:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 170r3K-00008l-00; Thu, 25 Apr 2002 17:45:22 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 170r2L-0008W6-00; Thu, 25 Apr 2002 17:44:21 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 827FA1049A3; Thu, 25 Apr 2002 23:47:13 +0200 (CEST) Original-To: ttn@glug.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i Errors-To: bug-guile-admin@gnu.org X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.bugs:184 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:184 On Thu, Apr 25, 2002 at 01:05:50PM -0700, Thien-Thi Nguyen wrote: >[...] > if someone can confirm similar behavior on another system (perhaps by > varying the appended string length), i will add this to the bugs db. > (i ask for this confirmation because my system's old sdrams are prone to > mysterious failures, and i want to rule that out as a reason.) Ok, this is on my rather 'old' guile-1.5 box (the guile-HEAD is at home): | guile> (version) | "1.5.0" | guile> (use-modules (ice-9 regex)) | guile> | guile> (define ok "Projects List") | guile> | guile> (define rx (make-regexp "(.*)")) | guile> | guile> (define (+space s n) | ... (string-append s (make-string n #\space))) | guile> | guile> (define (test s) | ... (format #t "string-length ~A\t=> ~A\n" | ... (string-length s) | ... (if (regexp-exec rx s) | ... "ok" | ... "FAIL"))) | guile> (test ok) | string-length 42 => ok | guile> (test (+space ok 11672)) | string-length 11714 => ok | guile> (test (+space ok 11673)) | string-length 11715 => ok | guile> (test (+space ok 11674)) | string-length 11716 => FAIL | guile> (test (+space ok 11675)) | string-length 11717 => FAIL | guile> (test (+space ok 11700)) | string-length 11742 => FAIL | guile> | Hmmm, never really used guile's regex heavily - that's where i still use perl. Ralf > thi > > ____________________________________________ > (use-modules (ice-9 regex)) > > (define ok "Projects List") > > (define rx (make-regexp "(.*)")) > > (define (+space s n) > (string-append s (make-string n #\space))) > > (define (test s) > (format #t "string-length ~A\t=> ~A\n" > (string-length s) > (if (regexp-exec rx s) > "ok" > "FAIL"))) > > ;; do it > (test ok) ; ok > (test (+space ok 11672)) ; ok > (test (+space ok 11673)) ; ok > (test (+space ok 11674)) ; FAIL > (test (+space ok 11675)) ; FAIL > (test (+space ok 11700)) ; FAIL > > _______________________________________________ > Guile-user mailing list > Guile-user@gnu.org > http://mail.gnu.org/mailman/listinfo/guile-user _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile