Path: utzoo!attcan!uunet!mcvax!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.sources.bugs Subject: jove 4.9 (regular expressions won't turn off) Message-ID: <44@titania.warwick.ac.uk> Date: 10 Sep 88 11:21:11 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 37 I hesitate to call this a bug, because the code is so deliberate. If anyone can justify this for me, I'd love to hear from them. Turning off match-regular-expressions doesn't turn off all the magic characters, which certainly surprised people round here when they tried to search for a string containing a `$'. The code in question, however, explicitly only disables ".[*", leaving ^, $, \{, \}, \(, \), \|, \digit, \<, \> enabled ? I can almost understand the \? constructs, people who use Unix learn that \ is magic, but ^ and $ ? Anyway, here's my current fix, I'd like to hear your opinion. RCS file: re.c,v retrieving revision 1.1 diff -c -r1.1 re.c *** /tmp/,RCSt1a02049 Sat Sep 10 12:14:34 1988 --- re.c Sat Sep 10 11:25:17 1988 *************** *** 153,159 **** if (c != '*') last_p = comp_p; ! if (kind == NORM && index(".[*", c) != 0) goto defchar; switch (c) { case '\\': --- 153,159 ---- if (c != '*') last_p = comp_p; ! if (kind == NORM) goto defchar; switch (c) { case '\\': -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England