On Aug 2, 7:34 pm, John Nagle <na...@animats.com> wrote:
>  >>> s2 = "   HELLO   THERE  "
>  >>> kresplit4 = re.compile(r'\W+', re.UNICODE)
>  >>> kresplit4.split(s2)
> ['', 'HELLO', 'THERE', '']
>
> I still get empty strings.

>>> re.findall(r"\w+", " a b c ")
['a', 'b', 'c']

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to