Mastering Regular Expressions, Second Edition - Jeffrey E F Friedl

Mastering Regular Expressions, Second Edition

Jeffrey E F Friedl

出版时间

2002-07-15

ISBN

9780596002893

评分

★★★★★
书籍介绍
Regular expressions are an extremely powerful tool for manipulating text and data. They have spread like wildfire in recent years, now offered as standard features in Perl, Java, VB.NET and C# (and any language using the .NET Framework), PHP, Python, Ruby, Tcl, MySQL, awk, Emacs, and many other popular tools and languages. If you don't use regular expressions yet, you will discover in this book a whole new world of mastery over your data. If you already use them, you'll appreciate this book's unprecedented detail and breadth of coverage. If you think you know all you need to know about regular expressions, this book is a stunning eye-opener. In spite their wide availability, flexibility, and unparalleled power, regular expressions are frequently underutilized. Regular expressions allow you to code complex and subtle text processing that you never imagined could be automated. Regular expressions can save you time and aggravation. They can be used to craft elegant solutions to a wide range of problems. A command of regular expressions is an invaluable skill. Yet what is power in the hands of an expert can be fraught with peril for the unwary. Mastering Regular Expressions will help you navigate the minefield to becoming an expert. Once you've mastered regular expressions, they'll become an invaluable part of your toolkit. You will wonder how you ever got by without them. Mastering Regular Expressions, Second Edition has been thoroughly updated to include all the new features of Perl 5.8, as well as several other languages, including Java, VB.NET, C#, Python, JavaScript, Tcl, and Ruby. Written in the lucid, entertaining tone that made a complex, dry topic crystal-clear to thousands of programmers, and sprinkled with solutions to complex real-world problems, Mastering Regular Expressions offers a wealth information that you can put to immediate use. Topics include:
  • A comparison of features among different versions of many languages and tools
  • How the regular expression engine works
  • Optimization (major savings available here!)
  • Matching just what you want, but not what you don't want
  • Sections and chapters on individual languages
  • AI导读
    核心看点
    • 深入解析正则匹配原理与引擎机制
    • 详解性能优化技巧与常见陷阱规避
    • 涵盖多语言实现差异与高级特性应用
    适合谁读
    • 希望从代码工人进阶为正则专家的开发者
    • 对技术底层原理有狂热追求的极客
    • 需处理复杂文本数据的后端工程师
    读前提醒
    • 仅想快速上手者无需阅读,看入门书即可
    • 前几章解决大部分问题,后几章较难需耐心
    • 建议结合具体编程语言章节针对性阅读
    读者共识
    • 正则领域权威经典,被誉为圣经级著作
    • 内容详尽全面,但部分章节晦涩难懂
    • 读完能彻底理解工作原理,解决疑难杂症

    本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

    精彩摘录
    • "除两个特定子域名之外的所有其他子域名"
    • "一类中单词起始位置分界符合结束位置分界符是相同的(通常是\<和\>)"
    • "常见的错误是在正则表达式之外使用\1;这种形式只在sed和vi中能用"
    • "顺序环视"
    • "in Spanish, the two characters ll (as in tortilla) traditionally sort as if it were one logical character between l and m, and the German ß is a character that falls between s and t, but sorts as if it were the two characters ss."
    • "……使用环视功能可以……但是某些时候,处理各种极端情形会降低成本/收益的比例。某些情况下,更合适的做法就是不依赖正则表达式完成全部工作。"
    • "「.*」很容易出问题,所以使用「.*」时必须格外谨慎,明确是否真的需要用一个星号来约束点号。有时候确实必须这么做,不过通常「.*」都不是合适的选择。"
    • "Microsoft 的 CSV 格式很流行,因为它是 Microsoft 的 CSV 格式,"
    用户评论
    这本书我读过
    虽然只看了前面几章,但是已经深深体会到regex的博大精深!
    看过两章
    讲得很详细很全面,最大的收获就是学到,有时候fail也是一种solution,刚接触regex的话看前三章就好,等用了一段时间过后再看456章学优化吧
    Really nice book, strongly recommend to every tech geek
    这本还是图书馆里站了一下午看完了
    读过中文版,感觉有些太详细了,应用不到。
    看来我只要弄懂perl就够了。。。
    收藏