MathGroup Archive 2005

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

Search the Archive


In[1]:= str = "1223322176644667983323456554";

In[2]:= StringCases[str, a_ ~~ b_ ~~ b_ ~~ c_ /; a != b != c]

Out[2]= {1223, 3221, 7664, 4667, 8332, 6554}

  the above code will extract the pattern  abbc  from the above string, but 
how i could put a rule to just display the substrings wich match this 
pattern and also have an inverted form in the main string so the output will 
give the following:

Out[2]= {1223, 3221, 7664, 4667}

George peite

Express yourself instantly with MSN Messenger! Download today it's FREE!

  • Prev by Date: Re: Colored Surface
  • Next by Date: Re: Prime[..] slows down
  • Previous by thread: Re: NIntegrate with Minimize
  • Next by thread: Re: about PATTERNS