def find_text(text, parts,
        names = ['CHARNOSNGLQUOTE', 'CHARNODBLQUOTE']):
    """
    If no match, return nothing.
    >>> grammar = "import := 'using'"
    >>> parts = ebnf_parser.parse(grammar)[1]
    >>> find_text(grammar, parts, ['digit'])

    Return first text matching.
    >>> find_text(grammar, parts, ['literal'])
    "'using'"

    By default find characters in single or double quotes.
    >>> find_text(grammar, parts)
    'using'
    >>> double_quote = 'import := "using"'
    >>> parts = ebnf_parser.parse(double_quote)[1]
    >>> find_text(double_quote, parts)
    'using'

    If multiple text found, only return the first found.
    >>> first = 'float_suffix := "f" / "F"'
    >>> parts = ebnf_parser.parse(first)[1]
    >>> find_text(first, parts)
    'f'
    """
    found = ''
    if parts:
        for tag, begin, end, part in parts:
            if tag in names:
                found += text[begin:end]
                break
            else:
                found_part = find_text(text, part, names)
                if found_part and not found:
                    found += found_part
    if found:
        return found