Page 1 of 1
regexmatch dates
Posted: 01 Mar 2021 05:49
by sweet40
hello fellow users...
anyone willing to help on this one?
needing to match stuff like
24 Feb, 2021
03 Dec, 2018
[dd short month dddd]
using regexmatch. Thanks in advance!
Re: regexmatch dates
Posted: 01 Mar 2021 08:27
by highend
$pattern = "\d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec), \d{4}";
Re: regexmatch dates
Posted: 01 Mar 2021 08:46
by sweet40
assuming I can also
Code: Select all
"\d{1,2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec), \d{4}";
so it's able to also capture the single digits for days, I guess it's done, thank you very much!
BTW... months can be lower cased or do I have to feed them to the pattern manually?
Re: regexmatch dates
Posted: 01 Mar 2021 08:48
by highend
You've read the help file entry for regexmatches()?
Re: regexmatch dates
Posted: 01 Mar 2021 09:19
by sweet40
now I have!
