正则表达式Cookbook(第二版,影印版)
Jan Goyvaerts, Steven Levithan
出版时间:2013年06月
页数:612
“正则表达式是一门永不过期的技术,而这本《正则表达式Cookbook》将是接下来若干年里知识和灵感的来源。”
——Ben Nadel
Epicenter咨询公司的首席软件工程师

再也不用猜测正则表达式的含义了。通过超过140个验证过的例子,本手册将为你提供一切所需来解决大量的实际问题。初学者可以从中学到基本的技能和工具,而程序员和有经验的用户会获益良多。每个例子都包含了你可以立刻使用的技巧。
本修订版本包括了在C#,Java,JavaScript,Perl, PHP, Python, Ruby和VB.NET中使用的多种不同的正则表达式。你将学到强大的新技能,避免那些在不同语言中使用正则表达式可能遇到的陷阱。通过这本包含大量实践方案的书籍,你将节省宝贵的时间。

· 通过细致的讲解来学习正则表达式的基础知识
· 根据代码清单,使用你所选择的语言来实现正则表达式
· 理解正则表达式在不同语言中的差异
· 在多个实例中验证和格式化常见的用户输入
· 查找和操纵单词、特殊字符以及多行文本
· 判断整数、浮点数和其他数字格式
· 在URL、文件路径和IP地址上运用正则表达式
· 操纵HTML、XML和数据交换格式
· 探讨少为人知的正则表达式窍门和技术

Jan Goyvaerts管理着Just Great Software公司,他设计和开发了一些最流行的正则表达式软件。
Steven Levithan是杰出的JavaScript正则表达式专家,同时他也是多个开源正则表达式工具的编写者。


  1. Chapter 1: Introduction to Regular Expressions
  2. Regular Expressions Defined
  3. Search and Replace with Regular Expressions
  4. Tools for Working with Regular Expressions
  5. Chapter 2: Basic Regular Expression Skills
  6. Match Literal Text
  7. Match Nonprintable Characters
  8. Match One of Many Characters
  9. Match Any Character
  10. Match Something at the Start and/or the End of a Line
  11. Match Whole Words
  12. Unicode Code Points, Categories, Blocks, and Scripts
  13. Match One of Several Alternatives
  14. Group and Capture Parts of the Match
  15. Match Previously Matched Text Again
  16. Capture and Name Parts of the Match
  17. Repeat Part of the Regex a Certain Number of Times
  18. Choose Minimal or Maximal Repetition
  19. Eliminate Needless Backtracking
  20. Prevent Runaway Repetition
  21. Test for a Match Without Adding It to the Overall Match
  22. Match One of Two Alternatives Based on a Condition
  23. Add Comments to a Regular Expression
  24. Insert Literal Text into the Replacement Text
  25. Insert the Regex Match into the Replacement Text
  26. Insert Part of the Regex Match into the Replacement Text
  27. Insert Match Context into the Replacement Text
  28. Chapter 3: Programming with Regular Expressions
  29. Programming Languages and Regex Flavors
  30. Literal Regular Expressions in Source Code
  31. Import the Regular Expression Library
  32. Create Regular Expression Objects
  33. Set Regular Expression Options
  34. Test If a Match Can Be Found Within a Subject String
  35. Test Whether a Regex Matches the Subject String Entirely
  36. Retrieve the Matched Text
  37. Determine the Position and Length of the Match
  38. Retrieve Part of the Matched Text
  39. Retrieve a List of All Matches
  40. Iterate over All Matches
  41. Validate Matches in Procedural Code
  42. Find a Match Within Another Match
  43. Replace All Matches
  44. Replace Matches Reusing Parts of the Match
  45. Replace Matches with Replacements Generated in Code
  46. Replace All Matches Within the Matches of Another Regex
  47. Replace All Matches Between the Matches of Another Regex
  48. Split a String
  49. Split a String, Keeping the Regex Matches
  50. Search Line by Line
  51. Construct a Parser
  52. Chapter 4: Validation and Formatting
  53. Validate Email Addresses
  54. Validate and Format North American Phone Numbers
  55. Validate International Phone Numbers
  56. Validate Traditional Date Formats
  57. Validate Traditional Date Formats, Excluding Invalid Dates
  58. Validate Traditional Time Formats
  59. Validate ISO 8601 Dates and Times
  60. Limit Input to Alphanumeric Characters
  61. Limit the Length of Text
  62. Limit the Number of Lines in Text
  63. Validate Affirmative Responses
  64. Validate Social Security Numbers
  65. Validate ISBNs
  66. Validate ZIP Codes
  67. Validate Canadian Postal Codes
  68. Validate U.K. Postcodes
  69. Find Addresses with Post Office Boxes
  70. Reformat Names From “FirstName LastName” to “LastName, FirstName”
  71. Validate Password Complexity
  72. Validate Credit Card Numbers
  73. European VAT Numbers
  74. Chapter 5: Words, Lines, and Special Characters
  75. Find a Specific Word
  76. Find Any of Multiple Words
  77. Find Similar Words
  78. Find All Except a Specific Word
  79. Find Any Word Not Followed by a Specific Word
  80. Find Any Word Not Preceded by a Specific Word
  81. Find Words Near Each Other
  82. Find Repeated Words
  83. Remove Duplicate Lines
  84. Match Complete Lines That Contain a Word
  85. Match Complete Lines That Do Not Contain a Word
  86. Trim Leading and Trailing Whitespace
  87. Replace Repeated Whitespace with a Single Space
  88. Escape Regular Expression Metacharacters
  89. Chapter 6: Numbers
  90. Integer Numbers
  91. Hexadecimal Numbers
  92. Binary Numbers
  93. Octal Numbers
  94. Decimal Numbers
  95. Strip Leading Zeros
  96. Numbers Within a Certain Range
  97. Hexadecimal Numbers Within a Certain Range
  98. Integer Numbers with Separators
  99. Floating-Point Numbers
  100. Numbers with Thousand Separators
  101. Add Thousand Separators to Numbers
  102. Roman Numerals
  103. Chapter 7: Source Code and Log Files
  104. Keywords
  105. Identifiers
  106. Numeric Constants
  107. Operators
  108. Single-Line Comments
  109. Multiline Comments
  110. All Comments
  111. Strings
  112. Strings with Escapes
  113. Regex Literals
  114. Here Documents
  115. Common Log Format
  116. Combined Log Format
  117. Broken Links Reported in Web Logs
  118. Chapter 8: URLs, Paths, and Internet Addresses
  119. Validating URLs
  120. Finding URLs Within Full Text
  121. Finding Quoted URLs in Full Text
  122. Finding URLs with Parentheses in Full Text
  123. Turn URLs into Links
  124. Validating URNs
  125. Validating Generic URLs
  126. Extracting the Scheme from a URL
  127. Extracting the User from a URL
  128. Extracting the Host from a URL
  129. Extracting the Port from a URL
  130. Extracting the Path from a URL
  131. Extracting the Query from a URL
  132. Extracting the Fragment from a URL
  133. Validating Domain Names
  134. Matching IPv4 Addresses
  135. Matching IPv6 Addresses
  136. Validate Windows Paths
  137. Split Windows Paths into Their Parts
  138. Extract the Drive Letter from a Windows Path
  139. Extract the Server and Share from a UNC Path
  140. Extract the Folder from a Windows Path
  141. Extract the Filename from a Windows Path
  142. Extract the File Extension from a Windows Path
  143. Strip Invalid Characters from Filenames
  144. Chapter 9: Markup and Data Formats
  145. Processing Markup and Data Formats with Regular Expressions
  146. Find XML-Style Tags
  147. Replace <b> Tags with <strong>
  148. Remove All XML-Style Tags Except <em> and <strong>
  149. Match XML Names
  150. Convert Plain Text to HTML by Adding <p> and <br> Tags
  151. Decode XML Entities
  152. Find a Specific Attribute in XML-Style Tags
  153. Add a cellspacing Attribute to <table> Tags That Do Not Already Include It
  154. Remove XML-Style Comments
  155. Find Words Within XML-Style Comments
  156. Change the Delimiter Used in CSV Files
  157. Extract CSV Fields from a Specific Column
  158. Match INI Section Headers
  159. Match INI Section Blocks
  160. Match INI Name-Value Pairs
书名:正则表达式Cookbook(第二版,影印版)
国内出版社:东南大学出版社
出版时间:2013年06月
页数:612
书号:978-7-5641-4202-5
原版书书名:Regular Expressions Cookbook, 2nd Edition
原版书出版商:O'Reilly Media
Jan Goyvaerts
 
Regular Expressions Cookbook is written by Jan Goyvaerts and Steven Levithan, two
of the world’s experts on regular expressions.
Jan Goyvaerts runs Just Great Software, where he designs and develops some of the
most popular regular expression software. His products include RegexBuddy, the
world’s only regular expression editor that emulates the peculiarities of 15 regular expression
flavors, and PowerGREP, the most feature-rich grep tool for Microsoft
Windows.
 
 
Steven Levithan
 
Regular Expressions Cookbook is written by Jan Goyvaerts and Steven Levithan, two
of the world’s experts on regular expressions.
Steven Levithan is a leading JavaScript regular expression expert and runs a popular
regular expression centric blog at http://blog.stevenlevithan.com. Expanding his knowledge
of the regular expression flavor and library landscape has been one of his hobbies
for the last several years.
 
 
购买选项
定价:79.00元
书号:978-7-5641-4202-5
出版社:东南大学出版社