Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: error with regular expression within package

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86584] Re: error with regular expression within package
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 13 Mar 2008 20:56:34 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <frasa2$1fo$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,


RegularExpression["\\w+"]

may help. Because Mathematica always want
a double backslash

Regards
   Jens

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[]
> 


  • Prev by Date: Re: error with regular expression within package
  • Next by Date: Re: Request
  • Previous by thread: Re: error with regular expression within package
  • Next by thread: Re: error with regular expression within package