12. Regular Expressions
Activity 1: Regular Expressions to Check If the Entrance is Entered in the Desired Format
Solution
- Visit https://packt.live/2MYzyFq.
- To the already exisiting regular expression from Exercise 1, add the rule to allow an optional alphabet after the number:
[a-zA-Z]{2,}\s{1}\d+[a-zA-Z]{1}
- Check if the RE works for Strandvagen 1a and Ringvagen 2b.