Regex Date

Hello all,

I would need to get the date, but I am not able to find the correct Regex code. Could you help me please?

This is the sentence and I need to get “25/11/20”.

“FECHA 25/11/20”

This is what I tried: (?<=FECHA\s+)[\d,]+

But i just get “25”.

Many thanks :slight_smile:


To match a date in mm/dd/yyyy format, rearrange the regular expression to
^(0[1-9]|1[012])- /.- /.\d\d$.
For dd-mm-yyyy format, use ^(0[1-9]|[12][0-9]|3[01])- /.- /.\d\d$.


Try with this regex,

\d?[\/|\-|\s]?\d?[\/|\-|\s]\d(\s?)[\/|\-|\s]?\d?(\s?)[\/|\-|\s]\d{2,4}[\s]?$ (14.3 KB) Take this xaml for your reference .

Happy learning:)

Hello @Angel_Llull


1 Like

Hello @Akshay07,

i am trying this in website RegExr and it gets the date. But in Studio, the variable is empty.

Do you know why is it happening?

Thanks :slight_smile:

Hello @sarathi125,

Thanks! But I am trying it and the variable is empty… Do you know why would it be happening?

Many thanks :slight_smile:


Sorry because I did not write whole text because I thought that maybe it was not necessary. But this is the whole sentence:

011A11 00000000 FECHA 25/11/20 CALLE

Would the code change in this case?

Sorry for the inconveniences.



have a look here:

(?<=FECHA )(\d+\/?){3}

Thanks! It worked :slight_smile:


If you want to learn Regex - check out my Regex Megapost.

1 Like

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