Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5052 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-09-18 08:23 +0000 |
| Last post | 2011-09-18 08:23 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: String Deletion Heike Gramberg <heike.gramberg@gmail.com> - 2011-09-18 08:23 +0000
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-09-18 08:23 +0000 |
| Subject | Re: String Deletion |
| Message-ID | <j549qa$6f4$1@smc.vnet.net> |
You could do something like DeleteCases[list, b_ /; StringMatchQ[b, ___ ~~ ":" ~~ ___]] Heike On 17 Sep 2011, at 12:27, 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? > > DeleteCases[list, ___:___] looks very logical and should work, > but of course it doesn't . > > Also, there is a StringCases function which would seem > to correspond with the Cases function. There is a > DeleteCases function but no string counterpart, namely, > DeleteString function. Any reason for this? > > Thanks in advance. >
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web