Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg53548] about PATTERNS
  • From: "George peite" <rasan1988 at>
  • Date: Sun, 16 Jan 2005 22:24:05 -0500 (EST)
  • Sender: owner-wri-mathgroup at

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