For reference here are some examples of regular expressions, variations of which can be useful for STE Enterprise Tasks:
if you want to test additional regular expressions: Here is a website.
^([A-Z]{9,11}$) --> between 9 and 11 characters, alphabet - upper case
- Example: ADSGFHAOJ or ADSGFHAOJS or ADSGFHAOJSK
^([A-Za-z]{9,11}$) --> between 9 and 11 characters, alphabet - mixed case
- Example: ADsgFhaoL or ADsgFhaoLM or ADsgFhaoLMN
^([0-9]{9,11}$) --> between 9 and 11 characters, numeric
- Example: 123456789 or 1234567890 or 12345678901
^(33[0-9]{7})$ --> starts with 33, followed by 7 numeric characters; total 9 characters
- Example: 331234567
^(6[0-9]{8})$ --> starts with 6, followed by 8 numeric character; total 9 characters
- Example: 612345678
^([0-9]{10}-[A-Z]{3})$ --> starts with 10 characters numeric, followed by "-", followed by 3 upper-case; total 14 characters (10x number, 1x "-", 3x letter)
- Example: 5123186618-XYZ
^([0-9]{10}-[a-z]{3})$ --> starts with 10 characters numeric, followed by "-", followed by 3 lower case letters; total 14 characters (10x number, 1x "-", 3x letter)
- Example: 5123186618-xyz
^([0-9A-Z]{8,10}$) --> between 8 and 10 characters, alphanumeric - upper case
- Example: 1BA1BA1B or 1BA1BA1BA or 1BA1BA1BA1
^([0-9a-z]{8,10}$) --> between 8 and 10 characters, alphanumeric - lower case
- Example: 1ba1ba1b or 1ba1ba1ba or 1ba1ba1ba1
^([0-9A-Za-z]{8,10}$) --> between 8 and 10 characters, alphanumeric - mixed case
- Example: 1Ba1Ba1b or 1Ba1Ba1bBa or 1Ba1Ba1Ba1
[0-9]{9}$ --> whatever is scanned ends with 9 numeric characters, can be preceded by multiple other things
- Example: 123456789
- Example: KSLSD123456789
- Example: 000123456789
Good resources to test regular expressions: www.regex101.com or https://regexr.com
Comments