Splitting with Regular Expressions

Fredrik Lundh fredrik at pythonware.com
Thu Mar 17 16:19:19 CET 2005

"qwweeeit" <qwweeeit at yahoo.it> wrote:

> Splitting with RE has (for me!) misterious behaviour!
> I want to get the words from this string:
> s= 'This+(that)= a.string!!!'
> in a list like that ['This', 'that', 'a.string']
> considering "a.string" as a word.

print re.findall("[\w.]+", s)


More information about the Python-list mailing list