Re: Extract numbers from a string

From: cody (please_dont.spam.deutronium_at_gmx.de)
Date: 05/16/04


Date: Sun, 16 May 2004 20:18:55 +0200

use the regex "[0-9]+" or "\d+" to extract numbers from a given string.

-- 
cody
[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
"Ryan" <web@balancestudios.com> schrieb im Newsbeitrag
news:eE$lTA3OEHA.2088@TK2MSFTNGP10.phx.gbl...
> I am trying to write a c# function to extract all numbers out of a string.
> What is the easiest way to do this, regular expressions?
>
> I must account for numbers formatted with or without commas (decimal
points
> are not important).
>
> thnx
>
>


Relevant Pages

  • Re: string functions
    ... Frank Kabel ... "Drew Kennelly" schrieb im Newsbeitrag ... does anybody know how to extract the domain name from an ...
    (microsoft.public.excel.misc)
  • Re: Messages stuck in Outbox
    ... Join me in my Forum @ ... "Ryan" schrieb im Newsbeitrag ...
    (microsoft.public.outlook.general)
  • Re: A blank column contains cells with unsorted numbers.
    ... "gestalt" schrieb im Newsbeitrag ... > I want to extract values and craete new list. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: combining two columns
    ... Frank Kabel ... "Ryan" schrieb im Newsbeitrag ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Recognising text as data
    ... "Grayling" schrieb im Newsbeitrag ... > and I extract to a number of P cells the date part using ...
    (microsoft.public.excel.worksheet.functions)