import re


def extract_word(line, point):

    """Return a prefix and suffix of the enclosing word.  The character under
    the cursor is the first character of the suffix."""

    wsre = re.compile('[ \t]')

    if point < 0 or point > len(line):
        return '', ''

    preii = point - 1
    while preii >= 0:
        if wsre.match(line[preii]):
            break
        preii -= 1
    preii += 1

    sufii = point
    while sufii < len(line):
        if wsre.match(line[sufii]):
            break
        sufii += 1

    return line[preii : point], line[point : sufii]