MathGroup Archive 2005

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

Search the Archive

Re: substrings at the end of words

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54984] Re: [mg54960] substrings at the end of words
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 8 Mar 2005 06:42:14 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8 Mar 2005, at 11:03, fartous at mail15.com wrote:

> a = {"edit", "listed", "called", "wedding"}
> StringCases[a, _ ~~ "ed"]
> Out[]= {{}, {ted}, {led}, {wed}}
> i want to extract only the "ed" string which located only at the end 
> of the
> words, i could not do that using the above code.
> thanks
> jack
>
>
>



a = {"edit", "listed", "called", "wedding"};


StringCases[a,StringExpression[__,"ed",EndOfString]]


{{},{listed},{called},{}}


Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/andrzej/index.html
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: coloring only some substring
  • Next by Date: symbolic approximation (formular manipulation)
  • Previous by thread: Re: substrings at the end of words
  • Next by thread: Re: substrings at the end of words