homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jason.Vas.Dias
Recipients Jason.Vas.Dias, r.david.murray
Date 2011年04月29日.10:22:05
SpamBayes Score 0.0003709208
Marked as misclassified No
Message-id <1304072526.46.0.0397510491235.issue11946@psf.upfronthosting.co.za>
In-reply-to
Content
Aha ! Yes, I see, it is the extra '.' - this test now works :
$ cat test.py
import os
import sys
import re
pat = r'''d......... # It is a directory.
 [+.@]?
 \s+\d+ # It has some number of links.
 [^/]* # Skip user, group, size, and date.
 /\. # and end with the name of the file.
 '''
str = 'drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.'
if re.match(pat, str, re.VERBOSE) :
 print "MATCHED\n"
else :
 print "DID NOT MATCH"
[ root@jvdspc:/mnt/sda3/Python-2.7 11:19:30 1758:1251 ]
$ LD_LIBRARY_PATH=`pwd` LD_PRELINK=`pwd`/libpython2.7.so.1.0 ./python ./test.py
MATCHED
I still think that RE belongs in a 'test_re' script, not in the
'test_commands' script - this whole series of issues could have
been avoided if the programmer had refrained from "showing off"
their RE prowess for no purpose here and just used a simple RE
like '^.*/\.$' .
History
Date User Action Args
2011年04月29日 10:22:06Jason.Vas.Diassetrecipients: + Jason.Vas.Dias, r.david.murray
2011年04月29日 10:22:06Jason.Vas.Diassetmessageid: <1304072526.46.0.0397510491235.issue11946@psf.upfronthosting.co.za>
2011年04月29日 10:22:05Jason.Vas.Diaslinkissue11946 messages
2011年04月29日 10:22:05Jason.Vas.Diascreate

AltStyle によって変換されたページ (->オリジナル) /