Regular Expressions Demonstration

Examples

  1. 'Standard' first name (capital letter followed by any number of lower case letters)

     

  2. Phone number in (exactly) 123-456-7890 format

  3. Phone number in (exactly) (123) 456-7890 format

  4. Phone number in 'flexible' format (either of above)

Student Exercises

  1. Positive integer allowing 25 or 205 or +25 but not 0 nor 025 nor +025 nor -25

  2. 'Loose' AU course code of 3 to 4 capital letters followed by exactly 4 decimal digits

  3. 'Strict' undergraduate SCCS course with prefix CSCI CYBR or AIST followed by 4 decimal digits where 1st digit is 1 2 3 or 4

  4. In my AIST3720 courses I have students create VMs named xxxxySn where xxxx is the first four letters of their AU login, y is L (for Linux) or W (for Windows), the S is fixed for Server, and n is a single digit > 0 for version number so my VMs would be named tschLS1 and tschWS3 for example. Validate that the entry is one of your VMs if / when you take the course (i.e., the first four characters need to be the start of your AU login in lower case, then L or W, then S required, then a non-zero digit).