Apple interview question

match 2 strings containing regex