Hi
I have this text “SAVE.INCOMING_418745_16MAR2021(1).ASCII.EPIN.TXT” i want a regex to extract 16MAR2021. Please how do I go about it again.
I wrote this (\d{2}\w{3}\d{4}) but i don’t think its efficient enough
Regards
Hi
I have this text “SAVE.INCOMING_418745_16MAR2021(1).ASCII.EPIN.TXT” i want a regex to extract 16MAR2021. Please how do I go about it again.
I wrote this (\d{2}\w{3}\d{4}) but i don’t think its efficient enough
Regards
Thank you . I am trying to achieve something that wouldn’t end up matching a string like “16COT2021” because COT is not a valid month
What @Srini84 said but remove ^ and $ if you want to match text in the middle. Also you need the option IgnoreCase if the months are not always in upper case.
(([0-9])|([0-2][0-9])|([3][0-1]))(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)\d{4}
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.