jove 4.9 (regular expressions won't turn off)

Rob McMahon cudcv at warwick.ac.uk
Sat Sep 10 21:21:11 AEST 1988


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 at uk.ac.warwick             ARPA:   cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England



More information about the Comp.sources.bugs mailing list