Introduction
The match method helps find patterns in text. It returns a MatchData object that holds details about the found pattern.
You want to check if a word or pattern exists in a sentence.
You need to extract parts of a string that match a pattern, like dates or emails.
You want to find where a pattern starts and ends in a string.