abcd wrote:
> not sure why this passes:
>
>
> >>> regex = r'[A-Za-z]:\\([^/:\*\?"<>\|])*'
> >>> p = re.compile(regex)
> >>> p.match('c:\\test')
> <_sre.SRE_Match object at 0x009D77E0>
> >>> p.match('c:\\test?:/')
> <_sre.SRE_Match object at 0x009D7720>
> >>>
>
> the last example shouldnt give a match

If you want to learn RE I suggest to use great tool redemo.py (tk app).
Then you can play with regular expressions to find the result
you are looking for.
It can be found in Python 2.4 in Tools\Scripts.

Regards,
Rob

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

Reply via email to