def _find_ws(s, start=0, end=None):
    '''Find whitespace. Interface similar to str.find.'''
    if end is not None:
        s = s[start:end]
    else:
        s = s[start:]
    x = _wsre.search(s)
    if x:
        return x.start()+start
    else:
        return -1
Find whitespace. Interface similar to str.find.
recipes/Python/499336_Summarizing_XHTML/recipe-499336.py