Good point Michael...thanks for the clarification.
-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 03, 2007 8:24 AM
To: CF-Talk
Subject: Re: RegEx to find a date in a string
I'd be hesitant to use {1,} as the modifier as it is totally open ended.
[0-9]{1,} will match 9, 99 and 9999999. If a month/date can be one or two
numbers then I can see using {1,2}. I used {2} assuming that the month/date
would always be a 2 digit number.
for those not in the know, {1} is a modifier that means that the previous
character, set or grouping should be matched once. {1,2} means that it should
be matched at lease once but not more than twice. {1,} means at least once but
no limit on the amount past once
> [0-9]{4}-[0-9]{1,}-[0-9]{1,} [0-9]{1,}:[0-9]{1,}:[0-9]{1,}\.0
>
> Is one way
>
> -----Original Message-----
> From: Web Specialist [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 03, 2007 7:52 AM
> To: CF-Talk
> Subject: RegEx to find a date in a string
>
> Hi all
>
> I'm parsing an HTML page with CFHTTP and need to find and get a date
> inside that. Do you know any regex to find a date in a string like
> this Date:
> 2007-05-03 08:11:29.0 ????
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276907
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4