简体   繁体   English

php正则表达式资源

[英]php regular expressions resources

can somebody point me to a good regular expression resource (for php if it matters). 有人可以指出我一个好的正则表达式资源(如果重要的话,适用于php)。 I am looking now for a book here amazon but don't know which one is better. 我现在正在亚马逊这里寻找一本书,但不知道哪一个更好。 It would be great to find something simple to understand and a fast and interesting process of learning. 找到一个简单易懂的东西,以及一个快速而有趣的学习过程,将是很棒的。

You can start at http://www.regular-expressions.info/ 您可以从http://www.regular-expressions.info/开始

The site also has a list of regular expressions books. 该网站还提供了正则表达式书籍列表

PHP supports several regular expressions variants, but the most important is PCRE (perl-comptabible regular expressions). PHP支持多种正则表达式变体,但最重要的是PCRE (可与perl兼容的正则表达式)。

The mb_ereg family, besides supporting several encodings, also supports several variants : mb_ereg系列除了支持多种编码外,还支持多种变体

j   Java (Sun java.util.regex)
u   GNU regex
g   grep
c   Emacs
r   Ruby
z   Perl
b   POSIX Basic regex
d   POSIX Extended regex

Mastering Regular Expressions by: Jeffrey EF Friedl is considered the bible of Regular Expressions books. 掌握正则表达式作者:Jeffrey EF Friedl被视为正则表达式书籍的圣经。

Also, as Artefacto mentioned: http://www.regular-expressions.info/ is a terrific resource with clear and simple explanations. 此外,正如Artefacto所提到的那样: http : //www.regular-expressions.info/是一个了不起的资源,其中包含清晰而简单的解释。

But the best way to learn is to play with them using a regex tool like Reggy (Mac tool) 但是最好的学习方法是使用Reggy等正则表达式工具(Mac工具)与他们一起玩

Along with http://www.regular-expressions.info , you might find it useful to get an interactive regex editor. http://www.regular-expressions.info一起 ,您可能会发现获取交互式正则表达式编辑器很有用。

The Regex Coach is a good, light-weight editor. Regex Coach是一个很好的轻量级编辑器。

RegexBuddy is amazing, but costly. RegexBuddy很棒,但价格昂贵。

regexpal.com a simple, online tester. regexpal.com一个简单的在线测试仪。

This is the only place I've found an intro to regular expressions that's suitable for beginners. 这是我找到适合初学者的正则表达式简介的唯一地方。 It's part of an online book called "Practical PHP". 它是在线书籍“ Practical PHP”的一部分。

http://www.tuxradar.com/practicalphp/4/8/0 http://www.tuxradar.com/practicalphp/4/8/0

These are the only regex books you'll ever need: 这些是您唯一需要的正则表达式书籍:

Mastering Regular Expressions 掌握正则表达式

Regular Expressions Cookbook 正则表达式食谱

Both are great tools for learning regexes in general, but they both have lots of information specific to PHP as well. 通常,它们都是学习正则表达式的好工具,但是它们都有很多特定于PHP的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM