@Override
    protected Result[] run(String value) {
        final Grok grok = grokPatternRegistry.cachedGrokForPattern(this.pattern, this.namedCapturesOnly);

        // the extractor instance is rebuilt every second anyway
        final Match match = grok.match(value);
        final Map<String, Object> matches = match.captureFlattened();
        final List<Result> results = new ArrayList<>(matches.size());

        for (final Map.Entry<String, Object> entry : matches.entrySet()) {
            // never add null values to the results, those don't make sense for us
            if (entry.getValue() != null) {
                results.add(new Result(entry.getValue(), entry.getKey(), -1, -1));
            }
        }

        return results.toArray(new Result[0]);
    }
@Test
    public void testDateWithComma() {
        final GrokExtractor extractor = makeExtractor("%{GREEDY:timestamp;date;yyyy-MM-dd'T'HH:mm:ss,SSSX}");
        final Extractor.Result[] results = extractor.run("2015-07-31T10:05:36,773Z");
        assertEquals("ISO date is parsed", 1, results.length);
        Object value = results[0].getValue();
        assertTrue(value instanceof Instant);
        DateTime date = new DateTime(((Instant) value).toEpochMilli(), DateTimeZone.UTC);

        assertEquals(2015, date.getYear());
        assertEquals(7, date.getMonthOfYear());
        assertEquals(31, date.getDayOfMonth());
        assertEquals(10, date.getHourOfDay());
        assertEquals(5, date.getMinuteOfHour());
        assertEquals(36, date.getSecondOfMinute());
        assertEquals(773, date.getMillisOfSecond());
    }