r"""
    Extends the syntax of regular expressions by replacing convineince syntax
      with re friendly syntax. Nameely things that I use in vim like \<\>

def extend_regex(regexpr):
    r"""
    Extends the syntax of regular expressions by replacing convineince syntax
      with re friendly syntax. Nameely things that I use in vim like \<\>
    """
    regex_map = {
        #r'\<': r'\b(?=\w)',
        #r'\>': r'\b(?!\w)',
        r'\<': r'\b' + positive_lookahead(r'\w'),
        r'\>': r'\b' + negative_lookahead(r'\w'),
        ('UNSAFE', r'\x08'): r'\b',
    }
    for key, repl in six.iteritems(regex_map):
        if isinstance(key, tuple):
            search = key[1]
        else:
            search = key
        if regexpr.find(search) != -1:
            if isinstance(key, tuple):
                print('WARNING! Unsafe regex with: %r' % (key,))
            regexpr = regexpr.replace(search, repl)
    return regexpr