Hello , please help me I want to very perfect regex to extract date from string in the format ddMMyyyy.
I.e in string “formular20092020copy” I want to extract 20092020 which is always going to be a date string in format ddMMyyyy.
Please I don’t know if its possible to make it smart enough to know 44132020 and 1332020 is not valid going by ddMMyyyy just should in case it sees other numbers in the string
In the above workflow i have used the Regex First and then If Statement as shown below :-
(CInt(item.ToString.Substring(0,2))>=1 And CInt(item.ToString.Substring(0,2))<=31) And (CInt(item.ToString.Substring(2,2))>=1 And CInt(item.ToString.Substring(2,2))<=12) And (DateTime.Now.Year).Equals(CInt(item.ToString.Substring(4,4)))