Question: what is regmatches in r?
Answer: regmatches() returns a character vector with matched or non-matched substrings if m is a character vector and invert is FALSE. Otherwise, it returns a list of character vectors with matched or non-matched substrings.