Skip to content

Terminal - SORT-O-MATIC



  • Elf: Pepper Minstix
  • Location: Front Lawn
  • Related to Objective: 4


Link: regular expression cheat sheet, this regex test interface.

The goal of this terminal challenge is to teach you about regular expression (Regex). The hint for this terminal challenge is available in the hint section.

You need to write 8 Regex expressions to ensure toys are sorted into the correct groups, The Island of Misfits or Santa's Bag. Here are the 8 things you need to write a Regex for:



Here are the answers for each challenge:

1) Matches at least one digit


2) Matches 3 alpha a-z characters ignoring case


3) Matches 2 chars of lowercase a-z or numbers

[a-z \d]{2,}

4) Matches any 2 chars not uppercase A-L or 1-5

[^A-L 1-5]{2,}

5) Matches three or more digits only


6) Matches multiple hour:minute:second time formats only


7) Matches MAC address format only while ignoring case


8) Matches multiple day, month, and year date formats only

\b[0-3]\d[/ . -][0-1]\d[/ . -]\d{4}\b

Once you complete the challenge you get the following message: