### Elasticsearch Version

7.17.6, 8.x

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Doesn't depend on the OS Version

### Problem Description

The Grok processor in the elasticsearch ingest pipelines does not extract multiple value that match a group but only the first one.

For example the following Grok expression:
```
^%{IPORHOST:source.address} (%{IPORHOST:source.address} )?
```

when given the following input:
```
"127.0.0.1 127.0.0.2"
```

It should match both values and not only the first one.

### Steps to Reproduce

```
POST /_ingest/pipeline/_simulate
{
  "pipeline": {
    "description": "_description",
    "processors": [
      {
        "grok": {
          "field": "message",
          "patterns": [
            "^%{IPORHOST:source.address} (%{IPORHOST:source.address} )?"
          ]
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "index",
      "_id": "id",
      "_source": {
        "message": "82.10.222.126 192.168.10.1"
      }
    }
  ]
}
```

The `source.addresses` in the response is:
```
{
  "docs": [
    {
      "doc": {
        "_index": "index",
        "_id": "id",
        "_version": "-3",
        "_source": {
          "message": "82.10.222.126 192.168.10.1",
          "apache": {
            "access": {
              "user": {
                "identity": "jean"
              }
            }
          },
          "source": {
            "address": "82.10.222.126"
          }
        },
        "_ingest": {
          "timestamp": "2022-12-01T09:10:24.439912308Z"
        }
      }
    }
  ]
}
```

While the expected value of `source.address` is:
```
{
  "docs": [
    {
      "doc": {
        "_index": "index",
        "_id": "id",
        "_version": "-3",
        "_source": {
          "message": "82.10.222.126 192.168.10.1",
          "apache": {
            "access": {
              "user": {
                "identity": "jean"
              }
            }
          },
          "source": {
            "address": [
              "82.10.222.126",
              "192.168.10.1"
            ]
          }
        },
        "_ingest": {
          "timestamp": "2022-12-01T09:10:24.439912308Z"
        }
      }
    }
  ]
}

### Logs (if relevant)

_No response_
libs/grok/src/test/java/org/elasticsearch/grok/GrokTests.java
Map<String, Object> matches = grok.captures(logLine);
        assertEquals(clientIp.v2(), matches.get(clientIp.v1().getKey()));
        assertEquals(ident.v2(), matches.get(ident.v1().getKey()));
        assertEquals(auth.v2(), matches.get(auth.v1().getKey()));
        assertEquals(timestamp.v2(), matches.get(timestamp.v1().getKey()));
        assertEquals(verb.v2(), matches.get(verb.v1().getKey()));
        assertEquals(request.v2(), matches.get(request.v1().getKey()));
        assertEquals(httpVersion.v2(), matches.get(httpVersion.v1().getKey()));
        assertEquals(bytes.v2(), matches.get(bytes.v1().getKey()));
        assertEquals(referrer.v2(), matches.get(referrer.v1().getKey()));
        assertEquals(null, matches.get("port"));
        assertEquals(agent.v2(), matches.get(agent.v1().getKey()));
        assertEquals(rawRequest.v2(), matches.get(rawRequest.v1().getKey()));
        for (var additionalField : additionalFields) {
            assertEquals(additionalField.v2(), matches.get(additionalField.v1().getKey()));
        }
    }
    public void testComplete() {
        Map<String, String> bank = new HashMap<>();
        bank.put("MONTHDAY", "(?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])|[1-9])");
        bank.put(
            "MONTH",
            "\\b(?:Jan(?:uary|uar)?|Feb(?:ruary|ruar)?|M(?:a|ä)?r(?:ch|z)?|Apr(?:il)?|Ma(?:y|i)?|Jun(?:e|i)"
                + "?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|O(?:c|k)?t(?:ober)?|Nov(?:ember)?|De(?:c|z)(?:ember)?)\\b"
        );
        bank.put("MINUTE", "(?:[0-5][0-9])");
        bank.put("YEAR", "(?>\\d\\d){1,2}");
        bank.put("HOUR", "(?:2[0123]|[01]?[0-9])");
        bank.put("SECOND", "(?:(?:[0-5]?[0-9]|60)(?:[:.,][0-9]+)?)");
        bank.put("TIME", "(?!<[0-9])%{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9])");