MathGroup Archive 2009

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

Search the Archive

When a string does not match itself

  • To: mathgroup at
  • Subject: [mg97198] When a string does not match itself
  • From: <ingolf.dahl at>
  • Date: Sat, 7 Mar 2009 02:42:57 -0500 (EST)
  • Organization: University of Gothenburg
  • Reply-to: <ingolf.dahl at>

This is a maybe a trivial question, but I have not found the explanation in
help (I am using Mathematica 7.0.0):


Normally a string matches itself:


In[270]:= StringMatchQ["monkey", "monkey"]  

Out[270]= True




In[271]:= StringMatchQ["\\*", "\\*"]  

Out[271]= False


Why? Compare also to


In[4]:= StringCases["\\*", "\\*"]   

Out[4]= {"\\*"}


In[267]:= StringPosition["\\*", "\\*"]  

Out[267]= {{1, 2}}


Best regards


Ingolf Dahl


ingolf.dahl at

  • Prev by Date: Re: Style for function calls?
  • Next by Date: Re: Mathematica and some General Comments
  • Previous by thread: Re: Wolfram/Alpha
  • Next by thread: Re: When a string does not match itself