[Tutor] confusions about re module
naheed arafat
naheedcse at gmail.com
Sun May 1 05:23:22 CEST 2011
someone please tell me why i'm getting this output?
specially the 'e3%' ! ! !
>>> import re
>>> re.findall('([\w]+.)','abdd.e3\45 dret.8dj st.jk')
['abdd.', 'e3%', 'dret.', '8dj ', 'st.', 'jk']
I am getting the same output for the following too..
>>> re.findall(r'([\w]+.)','abdd.e3\45 dret.8dj st.jk')
['abdd.', 'e3%', 'dret.', '8dj ', 'st.', 'jk']
wasn't i supposed to get ['abdd.','dret.'] ??
python version: 2.6.5
os: windows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110501/55de00c8/attachment.html>
More information about the Tutor
mailing list