MathGroup Archive 2009

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

Search the Archive

When a string does not match itself


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

 

But 

 

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

Sweden

ingolf.dahl at telia.com




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