Help wit regex to match the date string dddd MMM dd yyyy

Hello please someone assist with a regex pattern to match with the date Thursday Oct 20 2022

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(yourString,"(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{1,2}\s+\d{4}").Value

Regards,

1 Like

Hi @MasterOfLogic

How about this expression?

System.Text.RegularExpressions.Regex.Match(yourString,"\S+\s+\S{3}\s+\d{1,2}\s+\d{4}").ToString

image

Output

image

Regards
Gokul

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.