正则表达式Cookbook 第2版 英文PDF格式文档图书下载
1.Introduction to Regular Expressions 1
Regular Expressions Defined 1
Search and Replace with Regular Expressions 6
Tools for Working with Regular Expressions 8
2.Basic Regular Expression Skills 27
2.1 Match Literal Text 28
2.2 Match Nonprintable Characters 30
2.3 Match One of Many Characters 33
2.4 Match Any Character 38
2.5 Match Something at the Start and/or the End of a Line 40
2.6 Match Whole Words 45
2.7 Unicode Code Points,Categories,Blocks,and Scripts 48
2.8 Match One of Several Alternatives 62
2.9 Group and Capture Parts of the Match 63
2.10 Match Previously Matched Text Again 66
2.11 Capture and Name Parts of the Match 68
2.12 Repeat Part of the Regex a Certain Number of Times 72
2.13 Choose Minimal or Maximal Repetition 75
2.14 Eliminate Needless Backtracking 78
2.15 Prevent Runaway Repetition 81
2.16 Test for a Match Without Adding It to the Overall Match 84
2.17 Match One of Two Alternatives Based on a Condition 91
2.18 Add Comments to a Regular Expression 93
2.19 Insert Literal Text into the Replacement Text 95
2.20 Insert the Regex Match into the Replacement Text 98
2.21 Insert Part of the Regex Match into the Replacement Text 99
2.22 Insert Match Context into the Replacement Text 103
3.Programming with Regular Expressions 105
Programming Languages and Regex Flavors 105
3.1 Literal Regular Expressions in Source Code 111
3.2 Import the Regular Expression Library 117
3.3 Create Regular Expression Objects 119
3.4 Set Regular Expression Options 126
3.5 Test If a Match Can Be Found Within a Subject String 133
3.6 Test Whether a Regex Matches the Subject String Entirely 140
3.7 Retrieve the Matched Text 144
3.8 Determine the Position and Length of the Match 151
3.9 Retrieve Part of the Matched Text 156
3.10 Retrieve a List of All Matches 164
3.11 Iterate over All Matches 169
3.12 Validate Matches in Procedural Code 176
3.13 Find a Match Within Another Match 179
3.14 Replace All Matches 184
3.15 Replace Matches Reusing Parts of the Match 192
3.16 Replace Matches with Replacements Generated in Code 197
3.17 Replace All Matches Within the Matches of Another Regex 203
3.18 Replace All Matches Between the Matches of Another Regex 206
3.19 Split a String 211
3.20 Split a String,Keeping the Regex Matches 219
3.21 Search Line by Line 224
3.22 Construct a Parser 228
4.Validation and Formatting 243
4.1 Validate Email Addresses 243
4.2 Validate and Format North American Phone Numbers 249
4.3 Validate International Phone Numbers 254
4.4 Validate Traditional Date Formats 256
4.5 Validate Traditional Date Formats,Excluding Invalid Dates 260
4.6 Validate Traditional Time Formats 266
4.7 Validate ISO 8601 Dates and Times 269
4.8 Limit Input to Alphanumeric Characters 275
4.9 Limit the Length of Text 278
4.10 Limit the Number of Lines in Text 283
4.11 Validate Affirmative Responses 288
4.12 Validate Social Security Numbers 289
4.13 Validate ISBNs 292
4.14 Validate ZIP Codes 300
4.15 Validate Canadian Postal Codes 301
4.16 Validate U.K.Postcodes 302
4.17 Find Addresses with Post Office Boxes 303
4.18 Reformat Names From"FirstName LastName"to"LastName,FirstName" 305
4.19 Validate Password Complexity 308
4.20 Validate Credit Card Numbers 317
4.21 European VAT Numbers 323
5.Words,Lines,and Special Characters 331
5.1 Find a Specific Word 331
5.2 Find Any of Multiple Words 334
5.3 Find Similar Words 336
5.4 Find All Except a Specific Word 340
5.5 Find Any Word Not Followed by a Specific Word 342
5.6 Find Any Word Not Preceded by a Specific Word 344
5.7 Find Words Near Each Other 348
5.8 Find Repeated Words 355
5.9 Remove Duplicate Lines 358
5.10 Match Complete Lines That Contain a Word 362
5.11 Match Complete Lines That Do Not Contain a Word 364
5.12 Trim Leading and Trailing Whitespace 365
5.13 Replace Repeated Whitespace with a Single Space 369
5.14 Escape Regular Expression Metacharacters 371
6.Numbers 375
6.1 Integer Numbers 375
6.2 Hexadecimal Numbers 379
6.3 Binary Numbers 381
6.4 Octal Numbers 383
6.5 Decimal Numbers 384
6.6 Strip Leading Zeros 385
6.7 Numbers Within a Certain Range 386
6.8 Hexadecimal Numbers Within a Certain Range 392
6.9 Integer Numbers with Separators 395
6.10 Floating-Point Numbers 396
6.11 Numbers with Thousand Separators 399
6.12 Add Thousand Separators to Numbers 401
6.13 Roman Numerals 406
7.Source Code and Log Files 409
7.1 Keywords 409
7.2 Identifiers 412
7.3 Numeric Constants 413
7.4 Operators 414
7.5 Single-Line Comments 415
7.6 Multiline Comments 416
7.7 All Comments 417
7.8 Strings 418
7.9 Strings with Escapes 421
7.10 Regex Literals 423
7.11 Here Documents 425
7.12 Common Log Format 426
7.13 Combined Log Format 430
7.14 Broken Links Reported in Web Logs 431
8.URLs,Paths,andInternet Addresses 435
8.1 Validating URLs 435
8.2 Finding URLs Within Full Text 438
8.3 Finding Quoted URLs in Full Text 440
8.4 Finding URLs with Parentheses in Full Text 442
8.5 Turn URLs into Links 444
8.6 Validating URNs 445
8.7 Validating Generic URLs 447
8.8 Extracting the Scheme from a URL 453
8.9 Extracting the User from a URL 455
8.10 Extracting the Host from a URL 457
8.11 Extracting the Port from a URL 459
8.12 Extracting the Path from a URL 461
8.13 Extracting the Query from a URL 464
8.14 Extracting the Fragment from a URL 465
8.15 Validating Domain Names 466
8.16 Matching IPv4 Addresses 469
8.17 Matching IPv6 Addresses 472
8.18 Validate Windows Paths 486
8.19 Split Windows Paths into Their Parts 489
8.20 Extract the Drive Letter from a Windows Path 494
8.21 Extract the Server and Share from a UNC Path 495
8.22 Extract the Folder from a Windows Path 496
8.23 Extract the Filename from a Windows Path 498
8.24 Extract the File Extension from a Windows Path 499
8.25 Strip Invalid Characters from Filenames 500
9.Markup and Data Formats 503
Processing Markup and Data Formats with Regular Expressions 503
9.1 Find XML-Style Tags 510
9.2 Replace<b>Tags with<strong> 526
9.3 Remove All XML-Style Tags Except<em>and<strong> 530
9.4 Match XML Names 533
9.5 Convert Plain Text to HTML by Adding<p>and<br>Tags 539
9.6 Decode XML Entities 543
9.7 Find a Specific Attribute in XML-Style Tags 545
9.8 Add a cellspacing Attribute to<table>Tags That Do Not Already Include It 550
9.9 Remove XML-Style Comments 553
9.10 Find Words Within XML-Style Comments 558
9.11 Change the Delimiter Used in CSV Files 562
9.12 Extract CSV Fields from a Specific Column 565
9.13 Match INI Section Headers 569
9.14 Match INI Section Blocks 571
9.15 Match INI Name-Value Pairs 572
Index 575
- 《正则表达式入门经典》(美)瓦特,李松峰,李丽译 2008
- 《学习正则表达式》(美)菲茨杰拉德著 2013
- 《正则表达式入门 英文》(美)菲茨杰拉德著 2013
- 《正则表达式经典实例》(美)JanGoyvaerts,StevenLevithan著 2010
- 《精通正则表达式 第3版》(美)佛瑞德著 2012
- 《神奇的匹配 正则表达式求精之旅》王蕾等编著 2014
- 《正则表达式Cookbook》JanGoyvaerts,StevenLevitban著 2013
- 《正则表达式经典实例 第2版》(美)高瓦特斯(GoyvaertsJ.),(美)莱文森(LevitanS.)著;郭耀,迟骋译 2014
- 《正则表达式Cookbook 第2版 英文》(比)高瓦特斯,(美)利维森著 2013
- 《VB.NET字符串和正则表达式参考手册》(美)Francois Liger等著;康博译 2002
- 《正则表达式Cookbook 第2版 英文》(比)高瓦特斯,(美)利维森著 2013
- 《正则表达式经典实例 第2版》(美)高瓦特斯(GoyvaertsJ.),(美)莱文森(LevitanS.)著;郭耀,迟骋译 2014
- 《工人阶级多数》(美)A.利维森著;商务印书馆翻译组译 1976
- 《拓荒千金》(美)莎莉·瓦特森著;何卫青译 2014
- 《情人词典》(美)大卫·利维森著 2012
- 《变成有钱人法则》(美)华勒斯·瓦特斯著;曾明钰译 2010
- 《凡·高书信选》(荷)凡·高(Van Gogh,V.)著;(美)斯 通,(美)斯 通编;澹 泊等译 1991
- 《Hadoop安全 影印版》(美)本·斯皮维(Ben Spivey),(美)乔伊·爱彻利维亚(Joey Echeverria)著 2017
- 《微创胸外科手术图谱》(美)麦肯纳,(美)马他比法德,(美)斯汪森著 2014
- 《环保超人》(美)拉里·高尼克(Larry Gonick),(美)爱丽丝·奥特瓦特(Alice Outwater)著 2014
- 《THE GOVERNMENT/PRESS CONNECTION PRESS OFFICERS AND THEIR OFFICES》STEPHEN HESS 1984
- 《PRESS》POLITICS & PUBLIC OPINION IN BIHAR 1912-1947 2010
- 《Press law》Robin Callender Smith. 1978
- 《南京大学人文地理 1919-2012》黄贤金,张捷,罗小龙等主编 2012
- 《SUING THE PRESS》RODNEY A.SMOLLA 1986
- 《《东南日报》南京大屠杀报道研究》何扬鸣著 2014
- 《影像南大 南京大学百年图传》吴玫主编;王瑞宇,包海峰副主编 2015
- 《南京大学年鉴 2005》南京大学校长办公室编 2006
- 《南京大学年鉴 1999》南京大学校长办公室编 2000
- 《THE PRESS AND AMERICA》 2222