Python parse empty string
Question: I'm using the [`parse`](https://pypi.python.org/pypi/parse) library and ran
into surprising (to me) functionality: it does not match empty strings:

    
    
    >>> from parse import parse
    >>> parse('hi "{}"', 'hi "everybody"')
    <Result ('everybody',) {}>
    >>> parse('hi "{}"', 'hi ""')
    >>> 
    

Is there a way, using `parse`, to get it to match any string between `""` in
the same way that `re` does:

    
    
    >>> from re import match
    >>> match('hi "(.*)"', 'hi "everybody"').groups()
    ('everybody',)
    >>> match('hi "(.*)"', 'hi ""').groups()
    ('',)
    


Answer: Use a custom type conversion:

    
    
    from parse import parse
    def zero_or_more_string(text):
        return text
    
    zero_or_more_string.pattern = r".*"
    parse('hi "{:z}"', 'hi ""', { "z": zero_or_more_string })
    

and you'll get this:

    
    
    <Result ('',) {}>
    

