LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #20   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default extract date from text

On Mon, 1 Dec 2008 13:52:57 -0800 (PST), Harlan Grove
wrote:

Ron Rosenfeld wrote...
...
I suppose one could also use

\s([0]\d|\d|[12]\d|3[01])\D


Not specific enough - would allow 0 and 00 as valid day numbers.
Better to use
0?[1-9] in place of 0\d|\d .


Agree



1. *Mine should be (\d{4}|\d{2})

...

What about \d\d(\d\d)?


According to the RegexBuddy debugger, that takes 4 steps to match 08 and 5
steps to match 2008
--ron


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extract date from string kdp145 Excel Worksheet Functions 3 March 3rd 06 02:54 PM
Extract Date christmaslog Excel Worksheet Functions 1 February 19th 06 10:28 AM
extract date from the most current date Cali00 Excel Discussion (Misc queries) 1 April 13th 05 02:05 PM
How do I extract a date as text not the 1900 reference number Adam Excel Discussion (Misc queries) 3 March 23rd 05 05:04 PM
EXTRACT TEXT FROM A DATE Ronbo Excel Worksheet Functions 5 February 1st 05 07:39 AM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"