\w in regular expression
William Park
opengeometry at yahoo.ca
Sat Feb 28 16:09:43 EST 2004
Marcello Pietrobon <teiffel at attglobal.net> wrote:
> >>> p = re.compile(r'\W+')
> >>> p.split('This is a test, short and sweet, of split().')
> ['This', 'is', 'a', 'test', 'short', 'and', 'sweet', 'of', 'split', '']
>
> At first I thought a typo:
It's correct. No typo.
> In other word is Python re module not compatible with Perl ?
What answer were you expecting in Perl?
--
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
Linux solution for data management and processing.
More information about the Python-list
mailing list