Need to check the regex first so the matches array gets populated.