Below are a selection of ways to hone and practice your Regex skills. For the DSC event, we'll start together on the first part, and then afterwards you can choose a method of practice that appeals to you!
Email Validation:
-
Question 1 Link: Match all provided emails
-
Question 2 Link: Match only valid emails
Password Security:
- Question Link: Match any password 6-8 characters including letters or numbers, any case, in any order
- Question Solution
Telephone Numbers:
- Question Link: Match any telephone number in the US format 123-456-7890 or (123)456-7890
- Question Solution
There are many gamified ways to practice and learn Regex. We will use two for this lab:
- Regex Crossword, which has many Regex puzzles of varying difficulty.
- Regex Golf, which tests your ability to write precise Regex.
I have also created an app for this event, Redoku (located in the Redoku folder of this repo. Redoku is a simple React Native application that allows you to hone your Regex skills through sudoku-like puzzles (much like Regex crossword). This was heavily based on redoku, an awesome website with the same name. Thank you to @padolsey for granting permission to use the name "Redoku!" Download it below!
iOS | Android |
---|---|
If you're really ready to put your Regex skills to the test, feel free to attempt @gregable's Ultimate Regex Puzzle, which was initially part of MIT's 2013 Mystery Puzzle Hunt. While effectively a much more difficult version of the Redoku app or RegexCrossword, it will certainly be a strong indicator of your Regex prowess.