Regex question



This is really a regex question.

I am wonding if anyone knows a good Regex expression that would pull a valid
date from a string.

I have used:

strValue = Regex.Replace(valueIn, @"[^\d/]", "");

which works most of the time.

But I have some cases where I have strings like:

05/07/08(-4%)
09/19/08 DOM 55
09/19/2008 DOM 53
FOR 09/15/08 -23

Thanks,

Tom



.



Relevant Pages

  • Re: Regex question
    ... I am wonding if anyone knows a good Regex expression that would pull a valid date from a string. ... 09/19/2008 DOM 53 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex question
    ... I am wonding if anyone knows a good Regex expression that would pull a ... valid date from a string. ... 09/19/2008 DOM 53 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex question
    ... I am wonding if anyone knows a good Regex expression that would pull a ... valid date from a string. ... 09/19/2008 DOM 53 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex question
    ... I am wonding if anyone knows a good Regex expression that would pull a valid date from a string. ... 09/19/2008 DOM 53 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: getAttribute question
    ... oddity with IE that getAttributereturns an empty string if the ... HTML specification, ... appropriate places in the HTML 4 and DOM HTML specifications. ...
    (comp.lang.javascript)