Another RegEx question for a search I’m trying to do.
The Problem: Determine if user input is 13 digits long (numbers only) and ends with 52,56, or 57.
My current not working solution: [0-9]52|56|57${13}. I also tried [0-9]52|56|57{13}$ but no dice.
Help is appreciated.
Try this regular expression:
This is what it means:
^ Start of string [0-9] Any character in 0-9 {11} The previous token must match exactly 11 times. (52|56|57) Alternation - any one of the possibilities must match $ End of stringYou could also in this case simplify it to: