Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5033 > unrolled thread

Re: String Deletion

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-09-18 08:15 +0000
Last post2011-09-18 08:15 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: String Deletion Bill Rowe <readnews@sbcglobal.net> - 2011-09-18 08:15 +0000

#5033 — Re: String Deletion

FromBill Rowe <readnews@sbcglobal.net>
Date2011-09-18 08:15 +0000
SubjectRe: String Deletion
Message-ID<j549bu$6au$1@smc.vnet.net>
On 9/17/11 at 6:27 AM, donabc@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}

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web