回答
担任首发:
import re
print re.match("\$\d\d\.\d+", "$12.1")
print re.match("\$\d\d\.\d+", "12.1")
print re.match("\$\d\d\.\d+", "$123.1")
print re.match("\$\d\d\.\d+", "$12.")
如果您想了解更多关于在Python正则表达式,我建议:
也是关于正则表达式的google类视频: http://www.youtube.com/watch?v=kWyoYtvJpe4 – Stals
@Stals:谢谢你的提示,不知道。对于其他读者:http://www.youtube.com/watch?v=kWyoYtvJpe4 – rocksportrocker
嘿... http://www.regular-expressions.info/tutorial.html – xanatos
- 1. 正则表达式在Python
- 2. 正则表达式 - 在Python
- 3. 在python正则表达式
- 4. 正则表达式在Python
- 5. 正则表达式在Python
- 6. 正则表达式在Python
- 7. 电话号码正则表达式(正则表达式)在Python
- 8. 正则表达式正则表达式正则表达式使用正则表达式,但不是与Python
- 9. 正则表达式python表达式
- 10. Python的正则表达式:“喜欢”正则表达式模式?
- 11. Python正则表达式子
- 12. Python row.get(正则表达式)
- 13. Python 3.3正则表达式?
- 14. python正则表达式
- 15. Python和正则表达式
- 16. Python - 正则表达式dir
- 17. python unicode正则表达式
- 18. Python正则表达式
- 19. 正则表达式和Python
- 20. Python 2.6正则表达式
- 21. 的Python:正则表达式
- 22. Python正则表达式(\ .. +)?
- 23. python sql正则表达式
- 24. Python的正则表达式
- 25. Python的正则表达式?
- 26. 正则表达式^ $ Python?
- 27. IPv6正则表达式python
- 28. Python。正则表达式
- 29. Python正则表达式Findall
- 30. Python和正则表达式
你试过了什么? – Mat
正在尝试解析的正则表达式的语言也不清楚。 –
import re.match(^ $。) –