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