Bug in packages with RegularExpression[]
- To: mathgroup at smc.vnet.net
- Subject: [mg78708] Bug in packages with RegularExpression[]
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Sat, 7 Jul 2007 06:06:51 -0400 (EDT)
I have found a bug in Mathematica, version "6.0 for Mac OS X PowerPC (32-bit) (April 20, 2007)", where a legal syntax in a RegularExpression[] that is saved in a .m file is flagged as a error when the .m file is read in. To reproduce the error, create a file with the line NumberStringQ[s_]:=StringQ[s]&&StringMatchQ[s,RegularExpression["[-+]? [0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?"]] and save it as spam.m. Open a new notebook and input <<spam.m I get the error Syntax::sntoct2: 2 hexadecimal digits are required after \. to construct an 8-bit character. I have tried to simplify this further, with just a string containing the string "\.", but it seems to need the RegularExpression[] to generate the error. The error also occurs in the 32 bit Windows version.