description: Returns a slice of all successive matches of the regular expression. Each element is a slice of strings holding the text of the leftmost match of the regular expression and the matches, if any, of its subexpressions.
categories: [functions]
menu:
docs:
parent: functions
keywords: [regex]
signature:
- "findRESubmatch PATTERN INPUT [LIMIT]"
- "strings.FindRESubmatch PATTERN INPUT [LIMIT]"
relatedfuncs: [findRE, replaceRE]
---
By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT parameter. A return value of nil indicates no match.