HubSpot interview question

Q: Find the matching string patter in a given string.