MathGroup Archive 2011

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

Search the Archive

Re: String Deletion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121513] Re: String Deletion
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 18 Sep 2011 04:10:44 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

On 9/17/11 at 6:27 AM, donabc at comcast.net (Don) wrote:

>Given a simple list of strings:

>list =  List["Z:XBREG","Z:XBREH","Z:XBREI","Z:ZZ6P","Z:ZZ6Q","aye"]

>how does one delete all the strings with a colon (:) anywhere in the
>string?

In[9]:= DeleteCases[list, _?(StringMatchQ[#, ___ ~~ ":" ~~ ___] &)]

Out[9]= {aye}





  • Prev by Date: Re: String Deletion
  • Next by Date: Re: output forms
  • Previous by thread: Re: String Deletion
  • Next by thread: Re: String Deletion