Robinhood interview question

Simple string matching question using regex