|
From: | Andreas Vögele |
Subject: | empty regular expressions don't work on the BSDs |
Date: | Fri, 28 May 2004 22:28:34 +0200 |
(pass-if-exception "Proper exception with 0 modulus" (cons 'numerical-overflow "") <-- empty RE (modulo-expt 17 23 0))The problem is that on Mac OS X and the other BSDs regcomp() does not accept empty regular expressions. The BSD regex implementation is based on Henry Spencer's implementation. I don't know what POSIX says about empty REs but Henry Spencer's manual page says that "an empty string is not a legal RE" (see http://arglist.com/regex/regex3.html).
The tests in numbers.test succeed if the empty REs are replaced with ".". Another option would be to handle empty REs in string-match.
[Prev in Thread] | Current Thread | [Next in Thread] |