I need to enforce the pattern LASTNAME/FIRSTNAME Something like Smith/John.
The characters can be Alphanumeric (lowercase/uppercase) also includes special characters like ë etc.
Pattern:
<xsd:pattern value="[a-zA-Z0-9]/[a-zA-Z0-9]"/>
Basically the rules will be - Anything before the slash - Anything after the slash - Patterns like "/John", "John/" should not be allowed
Thanks in advance.
Your restriction should be this..
I validated this pattern by XMLSpear
ASCII
Assuming that you don't want numbers in the names:
If you really want to accept numbers in the names:
Be aware that
0/0
, for example, would be valid in this case, though.Unicode
Explanation:
\p{L}
matches a Unicode code point in the Letter category.