Matching a first occurrence in a string is the most common use-case.
You can get the first occurrence of a pattern in a subject by calling
match(), you can gain access to useful information about the matched occurrence.
You can read more extensively about it on
Retrieving capturing groups from a match is really simple.