### 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
});
        assertThat(specificCapture(g, text, bytesExtracter), is(true));
        assertThat(bytes[0], equalTo(12009.34f));
        long[] id = new long[1];
        GrokCaptureExtracter idExtracter = namedConfig(g, "id").nativeExtracter(new ThrowingNativeExtracterMap() {
            @Override
            public GrokCaptureExtracter forLong(Function<LongConsumer, GrokCaptureExtracter> buildExtracter) {
                return buildExtracter.apply(l -> id[0] = l);
            }
        });
        assertThat(specificCapture(g, text, idExtracter), is(true));
        assertThat(id[0], equalTo(20000000000L));
        double[] rating = new double[1];
        GrokCaptureExtracter ratingExtracter = namedConfig(g, "rating").nativeExtracter(new ThrowingNativeExtracterMap() {
            public GrokCaptureExtracter forDouble(java.util.function.Function<DoubleConsumer, GrokCaptureExtracter> buildExtracter) {
                return buildExtracter.apply(d -> rating[0] = d);
            }
        });
        assertThat(specificCapture(g, text, ratingExtracter), is(true));
        assertThat(rating[0], equalTo(4820.092));
    }
    public void testNumericCapturesCoercion() {
        Map<String, String> bank = new HashMap<>();
        bank.put("BASE10NUM", "(?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+)))");
        bank.put("NUMBER", "(?:%{BASE10NUM})");
        String pattern = "%{NUMBER:bytes:float} %{NUMBER:status} %{NUMBER}";
        Grok g = new Grok(bank, pattern, logger::warn);
        assertCaptureConfig(g, Map.of("bytes", FLOAT, "status", STRING));
        String text = "12009.34 200 9032";
        Map<String, Object> expected = new HashMap<>();