Extract numbers from a string

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ryan (web_at_balancestudios.com)
Date: 05/16/04


Date: Sun, 16 May 2004 13:00:33 -0500

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: Problem with Regular Expressions in .NET
    ... This won't recognize comments or strings - If your code contains a string ... > I'm using regular expressions to extract some information from my ... > I want to extract with regular expression a string that contains the ... > IgnoreCase flag, the MultiLine flag, but there is nothing to do. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem with Regular Expressions in .NET
    ... This won't recognize comments or strings - If your code contains a string ... > I'm using regular expressions to extract some information from my ... > I want to extract with regular expression a string that contains the ... > IgnoreCase flag, the MultiLine flag, but there is nothing to do. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Extracting Text from the right
    ... >1) To extract to the right of the last "." ... lot or your parsing tasks become more complicated, regular expressions ... shortest 2 chars. ... characters in the string. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Retireving numbers from a string in RegExp
    ... Rob wrote: ... > I'm not familiar with regular expressions and I need to extract ... > numbers only from a string. ...
    (microsoft.public.scripting.vbscript)
  • Retireving numbers from a string in RegExp
    ... I'm not familiar with regular expressions and I need to extract numbers ... only from a string. ... Prev by Date: ...
    (microsoft.public.scripting.vbscript)