Re: error with regular expression within package
- To: mathgroup at smc.vnet.net
- Subject: [mg86587] Re: error with regular expression within package
- From: dh <dh at metrohm.ch>
- Date: Thu, 13 Mar 2008 20:57:07 -0500 (EST)
- References: <frasa2$1fo$1@smc.vnet.net>
Hi Ramiro, in a mathematica string a backspace has to doubled, otherwise it is interpreted as escape character. hope this helps, Daniel ramiro wrote: > Hi, > > This must be very simple. But with package below, I get the following > error: > > << test.m > Syntax::stresc: Unknown string escape \w. > > Thanks, ramiro > > test.m: > > BeginPackage["testing`"] > test::usage="test[t]" > Begin["`Private`"] > > test[t_]:=StringCases[t,RegularExpression["\w+"]] > > End[] > > EndPackage[] >