首页  软件  游戏  图书  电影  电视剧

请输入您要查询的图书:

 

图书 正则表达式Cookbook(影印版)
内容
编辑推荐

本书提供了超过100条的锦囊妙计,帮助你利用正则表达式处理数据、操纵文本。本书对涉及此工具的最常见任务做了逐步讲解,此外还包括在C#、JaVa、JavaScipt、Perl、PHP、Python、Ruby和VB.NET语言中使用正则表达式的诀窍。无论你是初学者还是经验丰富的用户,本书都将有助于你对这一独特而不可替代的工具的理解。

内容推荐

本书提供了超过100条的锦囊妙计,帮助你利用正则表达式处理数据、操纵文本。每位程序员都能找到正则表达式的用武之地,但想要充分发挥它的威力却未必容易。纵使经验丰富的用户也常会遇到性能不佳、误判、漏判或者令人费解的错误。《正则表达式Cookbook》对涉及此工具的最常见任务做了逐步讲解,此外还包括在C#、JaVa、JavaScipt、Perl、PHP、Python、Ruby和VB.NET语言中使用正则表达式的诀窍。

阅读本书,你将:

·通过简洁的教程理解正则表达式的基本原理

·在多种编程和脚本语言中高效地应用正则表达式

·学习如何验证和格式化输入

·操纵单词、行、特殊字符和数值

·找到在URL、路径、标记和数据交换中使用正则表达式的方法

·学习更高级的正则表达式特性

·理解在不同语言中正则表达式的应用程序接口、语法和行为的不同

·针对特定需要,编写更加优化的正则表达式

无论你是初学者还是经验丰富的用户,《正则表达式Cookbook》都将有助于你对这一独特而不可替代的工具的理解。你将学到功能强大的新技巧,避免和语言相关的陷阱,利用这一经过实践检验的方法解决现实世界中的难题,从而节省宝贵的时间。

目录

Preface.

1. Introduction to Regular Expressions

Regular Expressions Defined

Searching and Replacing with Regular Expressions

Tools for Working with Regular Expressions

2. Basic Regular Expression Skills

  2.1 Match Literal Text

  2.2 Match Nonprintable Characters

  2.3 Match One of Many Characters

  2.4 Match Any Character

  2.5 Match Something at the Start and/or the End of a Line

  2.6 Match Whole Words

  2.7 Unicode Code Points, Properties, Blocks, and Scripts

  2.8 Match One of Several Alternatives

  2.9 Group and Capture Parts of the Match

 2.10 Match Previously Matched Text Again

 2.11 Capture and Name Parts of the Match

 2.12 Repeat Part of the Regex a Certain Number of Times

 2.13 Choose Minimal or Maximal Repetition

 2.14 Eliminate Needless Backtracking

 2.15 Prevent Runaway Repetition

 2.16 Test for a Match Without Adding It to the Overall Match

 2.17 Match One of Two Alternatives Based on a Condition

 2.18 Add Comments to a Regular Expression

 2.19 Insert Literal Text into the Replacement Text

 2.20 Insert the Regex Match into the Replacement Text

 2.21 Insert Part of the Regex Match into the Replacement Text

 2.22 Insert Match Context into the Replacement Text

3. Programming with Regular Expressions

Programming Languages and Regex Flavors

 3.1 Literal Regular Expressions in Source Code

 3.2 Import the Regular Expression Library

 3.3 Creating Regular Expression Objects

 3.4 Setting Regular Expression Options

 3.5 Test Whether a Match Can Be Found Within a Subject String

 3.6 Test Whether a Regex Matches the Subject String Entirely

 3.7 Retrieve the Matched Text

 3.8 Determine the Position and Length of the Match

 3.9 Retrieve Part of the Matched Text

3.10 Retrieve a List of All Matches

3.11 Iterate over All Matches

3.12 Validate Matches in Procedural Code

3.13 Find a Match Within Another Match

3.14 Replace All Matches

3.15 Replace Matches Reusing Parts of the Match

3.16 Replace Matches with Replacements Generated in Code

3.17 Replace All Matches Within the Matches of Another Regex

3.18 Replace All Matches Between the Matches of Another Regex

3.19 Split a String

3.20 Split a String, Keeping the Regex Matches

3.21 Search Line by Line

4. Validation and Formatting

 4.1 Validate Email Addresses

 4.2 Validate and Format North American Phone Numbers

 4.3 Validate International Phone Numbers

 4.4 Validate Traditional Date Formats

 4.5 Accurately Validate Traditional Date Formats

 4.6 Validate Traditional Time Formats

 4.7 Validate ISO 8601 Dates and Times

 4.8 Limit Input to Alphanumeric Characters

 4.9 Limit the Length of Text

4.10 Limit the Number of Lines in Text

4.11 Validate Affirmative Responses

4.12 Validate Social Security Numbers

4.13 Validate ISBNs

4.14 Validate ZIP Codes

4.15 Validate Canadian Postal Codes

4.16 Validate U.K. Postcodes

4.17 Find Addresses with Post Office Boxes

4.18 Reformat Names From "FirstName LastName" to "LastName, FirstName"

4.19 Validate Credit Card Numbers

4.20 European VAT Numbers

5. Words, Lines, and Special Characters

5.1 Find a Specific Word

5.2 Find Any of Multiple Words

5.3 Find Similar Words

5.4 Find All Except a Specific Word

5.5 Find Any Word Not Followed by a Specific Word

5.6 Find Any Word Not Preceded by a Specific Word

5.7 Find Words Near Each Other

5.8 Find Repeated Words

5.9 Remove Duplicate Lines

5.10 Match Complete Lines That Contain a Word

5.11 Match Complete Lines That Do Not Contain a Word

5.12 Trim Leading and Trailing Whitespace

5.13 Replace Repeated Whitespace with a Single Space

5.14 Escape Regular Expression Metacharacters

6. Numbers

6.1 Integer Numbers

6.2 Hexadecimal Numbers

6.3 Binary Numbers

6.4 Strip Leading Zeros

6.5 Numbers Within a Certain Range

6.6 Hexadecimal Numbers Within a Certain Range

6.7 Floating Point Numbers

6.8 Numbers with Thousand Separators

6.9 Roman Numerals

7. URLs, Paths, and Internet Addresses

7.1 Validating URLs

7.2 Finding URLs Within Full Text

7.3 Finding Quoted URLs in Full Text

7.4 Finding URLs with Parentheses in Full Text

7.5 Turn URLs into Links

7.6 Validating URNs

7.7 Validating Generic URLs

7.8 Extracting the Scheme from a URL

7.9 Extracting the User from a URL

7.10 Extracting the Host from a URL

7.11 Extracting the Port from a URL

7.12 Extracting the Path from a URL

7.13 Extracting the Query from a URL

7.14 Extracting the Fragment from a URL

7.15 Validating Domain Names

7.16 Matching IPv4 Addresses

7.17 Matching IPv6 Addresses

7.18 Validate Windows Paths

7.19 Split Windows Paths into Their Parts

7.20 Extract the Drive Letter from a Windows Path

7.21 Extract the Server and Share from a UNC Path

7.22 Extract the Folder from a Windows Path

7.23 Extract the Filename from a Windows Path

7.24 Extract the File Extension from a Windows Path

7.25 Strip Invalid Characters from Filenames

8. Markup and Data Interchange

 8.1 Find XML-Style Tags

 8.2 Replace <b> Tags with <strong>

 8.3 Remove All XML-Style Tags Except <em> and <strong>

 8.4 Match XML Names

 8.5 Convert Plain Text to HTML by Adding <p> and <br> Tags

 8.6 Find a Specific Attribute in XML-Style Tags

 8.7 Add a cellspacing Attribute to <table> Tags That Do Not Already Include It

 8.8 Remove XML-Style Comments

 8.9 Find Words Within XML-Style Comments

8.10 Change the Delimiter Used in CSV Files

8.11 Extract CSV Fields from a Specific Column

8.12 Match INI Section Headers

8.13 Match INI Section Blocks

8.14 Match INI Name-Value Pairs

Index

标签
缩略图
书名 正则表达式Cookbook(影印版)
副书名
原作名
作者 (美)高瓦特斯//莱文森
译者
编者
绘者
出版社 东南大学出版社
商品编码(ISBN) 9787564119317
开本 16开
页数 493
版次 1
装订 平装
字数 538
出版时间 2010-01-01
首版时间 2010-01-01
印刷时间 2010-01-01
正文语种
读者对象 青年(14-20岁),普通成人
适用范围
发行范围 公开发行
发行模式 实体书
首发网站
连载网址
图书大类 教育考试-考试-计算机类
图书小类
重量 0.786
CIP核字
中图分类号 TP301.2
丛书名
印张 32
印次 1
出版地 江苏
234
179
23
整理
媒质 图书
用纸 普通纸
是否注音
影印版本 原版
出版商国别 CN
是否套装 单册
著作权合同登记号 图字10-2009-247号
版权提供者 O'Reilly Media,Inc.
定价
印数 1600
出品方
作品荣誉
主角
配角
其他角色
一句话简介
立意
作品视角
所属系列
文章进度
内容简介
作者简介
目录
文摘
安全警示 适度休息有益身心健康,请勿长期沉迷于阅读小说。
随便看

 

兰台网图书档案馆全面收录古今中外各种图书,详细介绍图书的基本信息及目录、摘要等图书资料。

 

Copyright © 2004-2025 xlantai.com All Rights Reserved
更新时间:2025/5/16 6:13:47