Hey
Would somebody help with my RegEx validation, please.
I am using Nintex Form in SharePoint 2013 and this is my current RegEx:
^[A-Z]{4}[.][0-9]{4}[.][0-9]{8}[.][0-9]{3}
this validates the input only if it's like: PAGB.1234.12345678.123
Due to some changes, I also need to validate this PAGB.12345.12.123
Am I right to believe that this would achieve the above requirement:
^[A-Z]{4}[.][0-9]{4|5}[.][0-9]{2|8}[.][0-9]{3}
Thank you!!
Hi James,
Give this a shot:
^[A-Z]{4}[.]\d{4,5}[.]\d{2,8}[.]\d{3}
The error was because of the {4|5}. It didn't evaluate as 4 or 5 characters. Use {4,5} instead. You can also use \d in lieu of [0-9].
Let me know if this helps!