### 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
testUnicodeSyslog(true);
    }
    private void testUnicodeSyslog(boolean ecsCompatibility) {
        Grok grok = new Grok(
            Grok.getBuiltinPatterns(ecsCompatibility),
            "<%{POSINT:syslog_pri}>%{SPACE}%{SYSLOGTIMESTAMP:syslog_timestamp} "
                + "%{SYSLOGHOST:syslog_hostname} %{PROG:syslog_program}(:?)(?:\\[%{GREEDYDATA:syslog_pid}\\])?(:?) "
                + "%{GREEDYDATA:syslog_message}",
            logger::warn
        );
        assertCaptureConfig(
            grok,
            Map.ofEntries(
                Map.entry("syslog_hostname", STRING),
                Map.entry("syslog_message", STRING),
                Map.entry("syslog_pid", STRING),
                Map.entry("syslog_pri", STRING),
                Map.entry("syslog_program", STRING),
                Map.entry("syslog_timestamp", STRING)
            )
        );
        Map<String, Object> matches = grok.captures(
            "<22>Jan  4 07:50:46 mailmaster postfix/policy-spf[9454]: : "
                + "SPF permerror (Junk encountered in record 'v=spf1 mx a:mail.domain.no ip4:192.168.0.4 �all'): Envelope-from: "
                + "email@domain.no"
        );
        assertThat(matches.get("syslog_pri"), equalTo("22"));
        assertThat(matches.get("syslog_program"), equalTo("postfix/policy-spf"));
        assertThat(matches.get("tags"), nullValue());
    }