Papyrus - Regular expression error in constraint

123 Views Asked by At

The regular expression below validates dates in "dd/mm/yyyy", "dd.mm.yyyy" and "dd-mm-yyyy" formats and it works perfectly on regex101.com.

Regex:

^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[13-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$

However, when I include it in a constraint in Papyrus it gives the following error:

enter image description here

In addition to the above error, I know that I must use the escape character in some places, but I am not able to make it work. Has anyone had this problem and managed to solve it?

Thank you for any help.

0

There are 0 best solutions below