jose_luis_jb
Canvas Initiate

Using a Regular Expression for validation of a single line textbook

Jump to solution

Hello, I am starting to use Nintex Forms. I want to use a RegExp to validate a single line textbook. Valid inputs should look like:

  • MX ??? ??? ??? S 20##

or

  • MX ??? ??? S 20##

Where:

  • ? is a capital letter [A-Z] 
  • S is a any string of at least 3 characters
  • # is a digit [0-9] 

I tried with these 2 RegEx unsuccessfully:

/MX.[A-Z]{3}.[A-Z]{3}.[A-Za-z]{3,}.{1,}20{1}[0-9]{1}[0-9]{1}/

/MX[^\n\r][A-Z]{3}[^\n\r][A-Z]{3}[^\n\r][A-Za-z]{3,}[^\n\r]{1,}20{1}[0-9]{1}[0-9]{1}/

Any expert who  can help?

Thank you very much in advance.

 

 

0 Kudos
Reply
2 Replies
Tarf
Design Canvas Artiste

Re: Using a Regular Expression for validation of a single line textbook

Jump to solution

Hi @jose_luis_jb,

not a regular expression pro, but I got this working:

MX [A-Z]{3} [A-Z]{3} [A-Z]{3} \S{3,} 20[0-9]{2}$

 Tarf_0-1592897546942.png

 

View solution in original post

Reply
jose_luis_jb
Canvas Initiate

Re: Using a Regular Expression for validation of a single line textbook

Jump to solution
THANK YOU!
0 Kudos
Reply