Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,20 +3,17 @@ title: strings.FindRESubmatch
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: []
keywords: []
action:
aliases: [findRESubmatch]
related:
- functions/strings/FindRE
- functions/strings/Replace
- functions/strings/ReplaceRE
returnType: '[][]string'
signatures: ['strings.FindRESubmatch PATTERN INPUT [LIMIT]']
params:
functions_and_methods:
aliases: [findRESubmatch]
returnType: '[][]string'
signatures: ['strings.FindRESubmatch PATTERN INPUT [LIMIT]']
aliases: [/functions/findresubmatch]
---
By default, `findRESubmatch` finds all matches. You can limit the number of matches with an optional LIMIT argument. A return value of nil indicates no match.
{{% include "functions/_common/regular-expressions.md" %}}
{{% include "/_common/functions/regular-expressions.md" %}}
## Demonstrative examples
@@ -85,6 +82,5 @@ https://example.org
https://gohugo.io
```
{{% note %}}
You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin.
{{% /note %}}
> [!note]
> You can write and test your regular expression using [regex101.com](https://regex101.com/). Be sure to select the Go flavor before you begin.