Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Removing non-numeric characters from a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48464] Re: Removing non-numeric characters from a list
  • From: "Peter Pein" <petsie at arcor.de>
  • Date: Mon, 31 May 2004 00:13:50 -0400 (EDT)
  • References: <c99duf$k7e$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Charles Koehler" <charles.koehler at marquette.edu> schrieb im Newsbeitrag
news:c99duf$k7e$1 at smc.vnet.net...
> Thanks for you previous suggestions.
>
> I found that what I need is slighty more complicated than the question
> I originally submitted.  How would I  remove all non-numeric
> characters from each item in a list.  This would require the removal
> of characters in the list with the exception of Character Codes
> equivalent  to the digits (0-9) and the decimal point.
>
> Sincerely,
>
> Charles Koehler
>

In[1]:=digits = FromCharacterCode[Select[ToCharacterCode[#1],
      48 <= #1 <= 57 & ]] & ;  digits[$Version]
Out[2]= "40161999"

-- 
Peter Pein, Berlin
to write to me, start the subject with [




  • Prev by Date: Re: Arrow Body Width
  • Next by Date: Re: Eigensystem[] bug in Mathematica 5.0 (fixed in 5.0.1)
  • Previous by thread: Re: Removing non-numeric characters from a list
  • Next by thread: Ted Ersek's Mathematica Tips Updated