def exact_find_in_pattern(fixed_text, cur=0, patterns=PATTERNS):
    """Returns pattern items that match given text, cur position and pattern"""
    return [x for x in patterns if (cur + len(x['find']) <= len(fixed_text))
             and x['find'] == fixed_text[cur:(cur + len(x['find']))]]
def exact_find_in_pattern ( fixed_text , cur = 0 , patterns = PATTERNS ) : return [ x for x in patterns if ( cur + len ( x [ 'find' ] ) <= len ( fixed_text ) ) and x [ 'find' ] == fixed_text [ cur : ( cur + len ( x [ 'find' ] ) ) ] ]
Returns pattern items that match given text, cur position and pattern