Prevent the same repeated n times digit in XSD Schema validation

sehelly218

New Member
The overall goal is to prevent the same repeated digit in the US telephone numbers.See the following sample data:
  • 0000000000 - not legit
  • 7777777777 - not legit
  • 9549867899 - legit
  • 3051234567 - legit
I am trying to use regex pattern in the XSD validation.In particulary, a negative lookahead approach.Unfortunately, the XML Schema (XSD) regexes are limited.The following regex ^(?!(\d)\1{9,}) does the job everywhere else, but is not working in an XSD schemas.
 
Back
Top