Home All Groups Group Topic Archive Search About

need to find date in text string

Author
9 Mar 2006 6:51 PM
vonclausowitz
Hi All,

I have a text string from which I want to retrieve a date.
My string looks like:

"01 MAR 06 THIS IS MY FILE.doc"

Now I want to search with something like: 99 AAA 99 (for 13 MAR 06)

The text string is not always the same, so the date is not always on
the left
and can also be in the middle or on the right in the text string....

Regards
Marco

Author
9 Mar 2006 8:09 PM
Jeff Johnson [MVP: VB]
<vonclausow***@gmail.com> wrote in message
news:1141930284.719444.86390@v46g2000cwv.googlegroups.com...

> I have a text string from which I want to retrieve a date.
> My string looks like:
>
> "01 MAR 06 THIS IS MY FILE.doc"
>
> Now I want to search with something like: 99 AAA 99 (for 13 MAR 06)
>
> The text string is not always the same, so the date is not always on
> the left
> and can also be in the middle or on the right in the text string....

You can set a reference to Microsoft VBScript Regular Expressions x.x and
then use the RegExp class. Here's a great place to get started:
http://www.regular-expressions.info/