常用表达 [英] Regular Expressions

查看:67
本文介绍了常用表达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

学习Python正则表达式的方法是什么?我觉得

就像这样一个白痴 - 在编程语言中如此强大,但知道

无关于RE。

What''s the way to go about learning Python''s regular expressions? I feel
like such an idiot - being so strong in a programming language but knowing
nothing about RE.

推荐答案

" Geoff Hill" < th ************* @ gmail.comwrites:
"Geoff Hill" <th*************@gmail.comwrites:

学习Python的方法是什么?正则表达式?我觉得这样的白痴就像这样一个白痴 - 在编程语言中如此强大但却知道没有任何关于RE的内容。
What''s the way to go about learning Python''s regular expressions? I feel
like such an idiot - being so strong in a programming language but knowing
nothing about RE.



阅读文档?

Read the documentation?


2月11日上午10点26分,Geoff Hill < thegeoffmeis ... @ gmail.comwrote:
On Feb 11, 10:26 am, "Geoff Hill" <thegeoffmeis...@gmail.comwrote:

学习Python正则表达式的方法是什么?我觉得这样的白痴就像这样一个白痴 - 在编程语言中如此强大但却知道没有任何关于RE的内容。
What''s the way to go about learning Python''s regular expressions? I feel
like such an idiot - being so strong in a programming language but knowing
nothing about RE.



我建议你完成工作 http://www.amk.ca/python/howto/regex/

通过工作,我不会意思是读。我的意思是每个新概念引入



1.在交互式提示下自己尝试给出的示例

2.尝试示例的变化

3.阅读图书馆参考手册的相关部分


我也建议在这个新闻组中阅读线程,其中人们是

向re求助。


HTH,

John

I suggest that you work through the re HOWTO
http://www.amk.ca/python/howto/regex/
and by work through, I don''t mean "read". I mean as each new concept
is introduced:
1. try the given example(s) yourself at the interactive prompt
2. try variations on the examples
3. read the relevant part of the Library Reference Manual

Also I''d suggest reading threads in this newsgroup where people are
asking for help with re.

HTH,
John


" John Machin" < sj ****** @ lexicon.netwrites:
"John Machin" <sj******@lexicon.netwrites:

学习Python的方法是什么?正则表达式?我觉得这样的白痴就像这样一个白痴 - 在编程语言中如此强大但却知道没有任何关于RE的内容。
What''s the way to go about learning Python''s regular expressions? I feel
like such an idiot - being so strong in a programming language but knowing
nothing about RE.



我建议您完成工作 http://www.amk.ca/python/howto/regex/


I suggest that you work through the re HOWTO
http://www.amk.ca/python/howto/regex/



还记得Zawinski'的法律:
http://fishbowl.pastiche.org/ 2003/08 ... ar_expressions


这篇关于常用表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆