Article View: gnu.emacs.bug
Article #99276Bug in string-match.
From: Per Cederqvist
Date: Sat, 06 Oct 1990 21:53
Date: Sat, 06 Oct 1990 21:53
20 lines
1338 bytes
1338 bytes
I'm running GNU Emacs 18.55.2 of Fri May 18 1990 on nanny (berkeley-unix). The bug can be reproduced by typing: bash$ emacs -q (string-match "\\(.*\\)\n\\(\\(.\\|\n\\)*\\)\\'" "a^M^U638a") (string-match "\\(.*\\)\n\\(\\(.\\|\n\\)*\\)\\'" "^M^U639a") (string-match "\\(.*\\)\n\\(\\(.\\|\n\\)*\\)\\'" "a^M^U639a") (string-match "\\(.*\\)\n\\(\\(.\\|\n\\)*\\)\\'" "^M^U640a") (Type RETURN and CTRL-U instead of ^M and ^U.) The first and second string-match give the correct answer 0. The third gives 1 and the fourth gives nil. What I was trying to do when I encountered the bug was to split a string after the first newline. A friend pointed out that I could do that with a '(string-match "\n" foo)'... /Per Cederqvist, ceder@lysator.liu.se
Technical Details
Message-ID:
<9010062153.AA02185@nanny.lysator.liu.se>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!lysator.liu.se!cederShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,ba40286294be60b,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-10-06 16:24:20 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!lysator.liu.se!ceder From: ceder@lysator.liu.se (Per Cederqvist) Newsgroups: gnu.emacs.bug Subject: Bug in string-match. Message-ID: <9010062153.AA02185@nanny.lysator.liu.se> Date: 6 Oct 90 21:53:01 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 20 Posted: Sat Oct 6 22:53:01 1990