出版社: O'Reilly Media
出版年: 2012-8-2
页数: 152
定价: USD 29.99
装帧: Paperback
ISBN: 9781449392680
内容简介 · · · · · ·
Regular expressions remain a difficult part of the puzzle when learning how to program. Commonly used for sifting through large chunks of text, regexes are incredibly powerful although they may appear daunting to the newcomer. And variations among languages and environments make them even harder to master. Loaded with examples, this introductory guide walks beginners step-by-st...
Regular expressions remain a difficult part of the puzzle when learning how to program. Commonly used for sifting through large chunks of text, regexes are incredibly powerful although they may appear daunting to the newcomer. And variations among languages and environments make them even harder to master. Loaded with examples, this introductory guide walks beginners step-by-step through the fundamentals of regular expressions, and helps you decipher complex patterns. * Break down regular expressions into comprehensible parts * Learn common usage patterns through simple, easy-to-follow examples * Discover how finding unique patterns can help you avoid repetitive, hand-editing of text * Use common command-line tools such as grep and sed * Compare how regular expressions are implemented in different languages and environments
作者简介 · · · · · ·
Michael Fitzgerald 知名程序员、顾问、技术作家,为O’Reilly以及John Wiley & Sons编写过十余本技术图书,在O’Reilly Network上发表了大量文章。他曾是针对XML的RELAX NG模式语言委员会的成员。
喜欢读"Introducing Regular Expressions"的人也喜欢 · · · · · ·
Introducing Regular Expressions的话题 · · · · · · ( 全部 条 )



Introducing Regular Expressions的书评 · · · · · · ( 全部 8 条 )

一本简单的正则表达式使用介绍书籍

作为正则初学者的我帮助不大

适合正则表达式入门 讲解不够深入

适合没接触过正则的同学入门学习

了解RegExp的入门书籍
> 更多书评 8篇
读书笔记 · · · · · ·
我来写笔记-
大句哥哥 (make pie, or invent universe)
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference i...2013-05-23 09:14
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference it. like (\d)0\1 -> 707 or g/(word1)(word2)/\2 \1/ enclose digit in a pair of curly brace to describe last regex's occurrences. enclose a set of characters (or character class) by `[]` some quantifiers: . * ? + alternation: | ^$ dotall means a dot will match all characters, including newlines. ^.* with dotall mode will match whole text. word boundaries: \bword\b, \<word\> (older syntax, may not be avail in recent applications), \Aword\Z (Perl and PCRE) Quoting a Group of Characters as Literals: \Q$\E, or \$ (.^$*+?|(){}[]\-) (?i) case insensitive; (?m) multiple line; (?s) single line / dotline; (?x) ignore whitespace ??? (?<named_group>pattern) and $+{named_group} to back reference; use (?<name>pattern)aaaaaa<name> to reuse. ###### by language…….. (?:the|The|THE) non-capturing groups: do not need to store in memory. (?>the) to turn off backtracking. Greedy (try to match whole string), Lazy, and Possessive ( one attempt) ? Zero or one (optional) + One or more * Zero or more {n} Match n times exactly {n,} Match n or more times {m,n} Match m to n times {0,1} Same as ? (zero or one) {1,0} Same as + (one or more) {0,} Same as * (zero or more) ?? Lazy zero or one (optional) +? Lazy one or more *? Lazy zero or more {n}? Lazy n {n,}? Lazy n or more {m,n}? Lazy m,n Positive Lookaheads: time (?=results) #=> find out 'time' in 'time result' (((((( try it in ack/ag or negative lookaheads: (?!results) positive lookbehinds: (?<=time) result Negative Lookbehinds: (?1)(?<!ancyent) marinere % ack -i 'return (?=os)' ark_wsgi.py return os.popen(filename[1:], 'w', 1) % ack -i '(?<=os).popen' ark_wsgi.py return os.popen(filename[1:], 'w', 1) matching html start tags: <[_a-zA-Z][^>]*> Glossary pesky wildcard parenthesis - parentheses caret decipher Is your head spinning? gobble nibble archaic
回应 2013-05-23 09:14
-
大句哥哥 (make pie, or invent universe)
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference i...2013-05-23 09:14
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference it. like (\d)0\1 -> 707 or g/(word1)(word2)/\2 \1/ enclose digit in a pair of curly brace to describe last regex's occurrences. enclose a set of characters (or character class) by `[]` some quantifiers: . * ? + alternation: | ^$ dotall means a dot will match all characters, including newlines. ^.* with dotall mode will match whole text. word boundaries: \bword\b, \<word\> (older syntax, may not be avail in recent applications), \Aword\Z (Perl and PCRE) Quoting a Group of Characters as Literals: \Q$\E, or \$ (.^$*+?|(){}[]\-) (?i) case insensitive; (?m) multiple line; (?s) single line / dotline; (?x) ignore whitespace ??? (?<named_group>pattern) and $+{named_group} to back reference; use (?<name>pattern)aaaaaa<name> to reuse. ###### by language…….. (?:the|The|THE) non-capturing groups: do not need to store in memory. (?>the) to turn off backtracking. Greedy (try to match whole string), Lazy, and Possessive ( one attempt) ? Zero or one (optional) + One or more * Zero or more {n} Match n times exactly {n,} Match n or more times {m,n} Match m to n times {0,1} Same as ? (zero or one) {1,0} Same as + (one or more) {0,} Same as * (zero or more) ?? Lazy zero or one (optional) +? Lazy one or more *? Lazy zero or more {n}? Lazy n {n,}? Lazy n or more {m,n}? Lazy m,n Positive Lookaheads: time (?=results) #=> find out 'time' in 'time result' (((((( try it in ack/ag or negative lookaheads: (?!results) positive lookbehinds: (?<=time) result Negative Lookbehinds: (?1)(?<!ancyent) marinere % ack -i 'return (?=os)' ark_wsgi.py return os.popen(filename[1:], 'w', 1) % ack -i '(?<=os).popen' ark_wsgi.py return os.popen(filename[1:], 'w', 1) matching html start tags: <[_a-zA-Z][^>]*> Glossary pesky wildcard parenthesis - parentheses caret decipher Is your head spinning? gobble nibble archaic
回应 2013-05-23 09:14
-
大句哥哥 (make pie, or invent universe)
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference i...2013-05-23 09:14
[0-9] The square brackets are not literally matched because they are treated specially as metacharacters. character escape would lead to misleading, try to avoid it: not always supported and less flexibility of character class. Use digit character class. \D = [^0-9] = [^\d] \w = [0-9a-zA-Z], \W = [^\w] enclose regex in a pair of parenthesis to place it in a group, and use \1 to back reference it. like (\d)0\1 -> 707 or g/(word1)(word2)/\2 \1/ enclose digit in a pair of curly brace to describe last regex's occurrences. enclose a set of characters (or character class) by `[]` some quantifiers: . * ? + alternation: | ^$ dotall means a dot will match all characters, including newlines. ^.* with dotall mode will match whole text. word boundaries: \bword\b, \<word\> (older syntax, may not be avail in recent applications), \Aword\Z (Perl and PCRE) Quoting a Group of Characters as Literals: \Q$\E, or \$ (.^$*+?|(){}[]\-) (?i) case insensitive; (?m) multiple line; (?s) single line / dotline; (?x) ignore whitespace ??? (?<named_group>pattern) and $+{named_group} to back reference; use (?<name>pattern)aaaaaa<name> to reuse. ###### by language…….. (?:the|The|THE) non-capturing groups: do not need to store in memory. (?>the) to turn off backtracking. Greedy (try to match whole string), Lazy, and Possessive ( one attempt) ? Zero or one (optional) + One or more * Zero or more {n} Match n times exactly {n,} Match n or more times {m,n} Match m to n times {0,1} Same as ? (zero or one) {1,0} Same as + (one or more) {0,} Same as * (zero or more) ?? Lazy zero or one (optional) +? Lazy one or more *? Lazy zero or more {n}? Lazy n {n,}? Lazy n or more {m,n}? Lazy m,n Positive Lookaheads: time (?=results) #=> find out 'time' in 'time result' (((((( try it in ack/ag or negative lookaheads: (?!results) positive lookbehinds: (?<=time) result Negative Lookbehinds: (?1)(?<!ancyent) marinere % ack -i 'return (?=os)' ark_wsgi.py return os.popen(filename[1:], 'w', 1) % ack -i '(?<=os).popen' ark_wsgi.py return os.popen(filename[1:], 'w', 1) matching html start tags: <[_a-zA-Z][^>]*> Glossary pesky wildcard parenthesis - parentheses caret decipher Is your head spinning? gobble nibble archaic
回应 2013-05-23 09:14
这本书的其他版本 · · · · · · ( 全部3 )
-
人民邮电出版社 (2013)6.8分 122人读过
-
暂时无货, 8天前曾上架
-
东南大学出版社 (2013)暂无评分 2人读过
以下书单推荐 · · · · · · ( 全部 )
谁读这本书?
二手市场
订阅关于Introducing Regular Expressions的评论:
feed: rss 2.0
2 有用 芳煙 2020-02-05
就书的结构来说,个人觉得比较零散,重复部分较多。不过对于初学者来说是值得一读的,反正我是挺有收获。 另外作者很幽默,“Greedy, Lazy and Possessive”那一节里,作者写道:“I'm not talking about your teenager here, I'm talking about quantifiers.” hahaha!
0 有用 大句哥哥 2013-05-23
good for novice
0 有用 认清形势小豹猫 2018-10-20
The book takes an inductive approach and the content is arranged from specific to general, from examples to short treatises. It is a learning-by-doing book and friendly for beginners.
0 有用 Tommy 2012-08-13
大概了解了一下,还要多用用才能掌握
0 有用 奏乐 2013-05-29
作为一本入门书还是讲得比较全面的,不过我期待的是一些让我眼前一亮的知识,这里似乎没有。
2 有用 芳煙 2020-02-05
就书的结构来说,个人觉得比较零散,重复部分较多。不过对于初学者来说是值得一读的,反正我是挺有收获。 另外作者很幽默,“Greedy, Lazy and Possessive”那一节里,作者写道:“I'm not talking about your teenager here, I'm talking about quantifiers.” hahaha!
0 有用 认清形势小豹猫 2018-10-20
The book takes an inductive approach and the content is arranged from specific to general, from examples to short treatises. It is a learning-by-doing book and friendly for beginners.
0 有用 旋光 2017-01-29
极易入门
0 有用 赵瑞 2014-04-28
简单易懂,对于RE的新手来说,初级应用足够了。
0 有用 lilin 2013-09-15
内容较少,反复较多