Message259742
| Author |
anish.shah |
| Recipients |
Kunal Grover, anish.shah, demian.brecht, jaraco, serhiy.storchaka |
| Date |
2016年02月06日.17:33:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1454779995.95.0.654074425128.issue26302@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
We just need to use '\-' instead of '-'.
```
>>> regex = re.compile("[a-z]")
>>> bool(regex.match('b'))
True
>>> regex = re.compile("[a\-z]")
>>> bool(regex.match('b'))
False
```
I have uploaded a patch.
Let me know if this needs some tests too? |
|