public List<DataURIScheme> extract(String string) {
        extractMatcher.reset(string);
        List<DataURIScheme> list = null;
        while (extractMatcher.find()) {
            DataURIScheme dataURIScheme = build(extractMatcher.group(1), extractMatcher.group(2),
                    extractMatcher.group(3));
            if (list == null) {
                list = new ArrayList<>();
            }
            list.add(dataURIScheme);
        }
        return (list == null) ? Collections.EMPTY_LIST : list;
    }
Extracts DataURISchemes from free text, as in javascript.

@param string
@return list of extracted DataURISchemes
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-html-module/src/main/java/org/apache/tika/parser/html/DataURISchemeUtil.java