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


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

Re: String Deletion

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: String Deletion
Date 2011-09-18 08:15 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j549bu$6au$1@smc.vnet.net> (permalink)

Show all headers | View raw


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}

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web