### 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
tuple(Map.entry("log.syslog.priority", INTEGER), null),
            tuple(Map.entry("process.name", STRING), program),
            tuple(Map.entry("timestamp", STRING), timestamp),
            null,
            List.of("timestamp")
        );
    }
    private void testSimpleSyslogLine(
        boolean ecsCompatibility,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> facility,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> logSource,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> message,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> pid,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> priority,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> program,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> timestamp,
        Tuple<Map.Entry<String, GrokCaptureType>, Object> timestamp8601,
        List<String> acceptedDuplicates
    ) {
        String line = "Mar 16 00:01:25 evita postfix/smtpd[1713]: connect from camomile.cloud9.net[168.100.1.3]";
        Grok grok = new Grok(Grok.getBuiltinPatterns(ecsCompatibility), "%{SYSLOGLINE}", logger::warn);
        Map<String, GrokCaptureType> captureTypes = new HashMap<>();
        captureTypes.put(facility.v1().getKey(), facility.v1().getValue());
        captureTypes.put(logSource.v1().getKey(), logSource.v1().getValue());
        captureTypes.put(message.v1().getKey(), message.v1().getValue());
        captureTypes.put(pid.v1().getKey(), pid.v1().getValue());
        captureTypes.put(priority.v1().getKey(), priority.v1().getValue());
        captureTypes.put(program.v1().getKey(), program.v1().getValue());
        captureTypes.put(timestamp.v1().getKey(), timestamp.v1().getValue());
        if (timestamp8601 != null) {