0

I have three different pattern values in an XML Schema:

  1. "[A-Z0-9]{1,12}"
  2. "([A-Z0-9]{2})|"
  3. "([A-Z0-9 /]{1,25})|"

My interpretation of example 1 is value can contain between 1 and 12 capital letters or digits between 0 and 9.

I'm confused about the or symbol at the end of example 2. Or what? Since the or symbol is at the end of the statement.

In example 3 what does the / do? Same question above as it applies to the trailing |.

kjhughes
  • 89,675
  • 16
  • 141
  • 199
cubflier
  • 47
  • 5

1 Answers1

1

([A-Z0-9]{2})|: two capital letters or digits, or nothing.

([A-Z0-9 /]{1,25})|: 1 to 25 capital letters, digits, space chars, or / chars, or nothing. Alternatively: ([A-Z0-9 /]{0,25})

kjhughes
  • 89,675
  • 16
  • 141
  • 199