JamesZimmerman

Advise with RegEx validation in SP13 Nintex Form

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!!

 

0 Kudos
Reply
2 Replies
DavidL2
Nintex Professional Services Expert

Re: Advise with RegEx validation in SP13 Nintex Form

Here are some online resources you can use to troubleshoot RegEx:
https://www.regextester.com/
https://regex101.com/
0 Kudos
Reply
katie_chu
Nintex Workflow Cloud Expert
Nintex Workflow Cloud Expert

Re: Advise with RegEx validation in SP13 Nintex Form

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!

0 Kudos
Reply