Python的正则表达式? [英] Python's regular expression?

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

问题描述

大家好,


我是C / C ++ / Perl用户并希望切换到Python(我发现Python是/ b $ b更类似于C )。


Python是否支持像Perl这样强大的正则表达式?

和Python和Perl的文件内容操作,哪个更好?


如有任何建议,我们将不胜感激!

祝你好运,

Davy

Hi all,

I am a C/C++/Perl user and want to switch to Python (I found Python is
more similar to C).

Does Python support robust regular expression like Perl?

And Python and Perl''s File content manipulation, which is better?

Any suggestions will be appreciated!
Best regards,
Davy

推荐答案

" Davy" < ZH ******* @ gmail.com>写道:
"Davy" <zh*******@gmail.com> writes:
Python是否支持强大的正则表达式,如Perl?
Does Python support robust regular expression like Perl?




是的,Python正则表达式是健壮的。看一下Regex Howto:
http:// www .amk.ca / python / howto / regex / 和re模块:
http://docs.python.org/lib/module-re.html

-

劳伦斯 - http://www.oluyede.org/blog

没有什么比一个想法更危险

如果它是你唯一拥有的那个 - EA Chartier



Yep, Python regular expression is robust. Have a look at the Regex Howto:
http://www.amk.ca/python/howto/regex/ and the re module:
http://docs.python.org/lib/module-re.html

--
Lawrence - http://www.oluyede.org/blog
"Nothing is more dangerous than an idea
if it''s the only one you have" - E. A. Chartier


Hi Davy写道:
Hi Davy wrote:
我是C / C ++ / Perl用户,想切换到Python


OK

(我发现Python更像C)。


;-)比什么更相似?

Python是否支持像Perl这样强大的正则表达式?


它支持它们相当不错,但它是'b $ b'不是''整合'' - 至少感觉不是

为我集成;-)如果你做了很多

Perl,你知道什么''集成''意味着...

和Python和Perl'的文件内容操作,哪个更好?


什么是''文件内容操作''?

您的意思是''良好的xxx级文件IO'',

其中xxx表示''低''或''高''?

任何建议都将不胜感激!
I am a C/C++/Perl user and want to switch to Python
OK
(I found Python is more similar to C).
;-) More similar than what?
Does Python support robust regular expression like Perl?
It supports them fairly good, but it''s
not ''integrated'' - at least it feels not
integrated for me ;-) If you did a lot of
Perl, you know what ''integrated'' means ...
And Python and Perl''s File content manipulation, which is better?
What is a ''file content manipulation''?
Did you mean ''good xxx level file IO'',
where xxx means either ''low'' or ''high''?
Any suggestions will be appreciated!




试一试用Python创建一个小项目 -

来自你已经拥有的C或Perl

或者什么。

问候


Mirco



Just try to start a small project in Python -
from source that you already have in C or Perl
or something.
Regards

Mirco


你好Mirco,


谢谢!


比Perl更相似;-)


什么是集成意味着什么(必须包含一些库)?


我喜欢C ++文件I / O,它是'低'还是''高'?


问候,

Davy

Hi Mirco,

Thank you!

More similar than Perl ;-)

And what''s ''integrated'' mean (must include some library)?

I like C++ file I/O, is it ''low'' or ''high''?

Regards,
Davy


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

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