注冊 | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當前位置: 首頁出版圖書科學(xué)技術(shù)計算機/網(wǎng)絡(luò)軟件與程序設(shè)計其他編程語言/工具精通正則表達式:英文本

精通正則表達式:英文本

精通正則表達式:英文本

定 價:¥72.00

作 者: (美)Jeffrey E.F.Friedl著
出版社: 東南大學(xué)出版社
叢編項: 東南大學(xué)出版社O'Reilly圖書系列
標 簽: perl

ISBN: 9787564100414 出版時間: 2005-09-01 包裝: 膠版紙
開本: 23cm 頁數(shù): 460 字數(shù):  

內(nèi)容簡介

  正則表達式是一種用來操作文本和數(shù)據(jù)的強大工具。近年來,它們快速廣泛傳播,并被多種流行工具和語言作為標準特性提供,如Perl、Java、VB.NET、C#(及任何使用.NET框架的語言)、PHP、Python、Ruby、Tcl、MySQL、awk、Emacs等。 如果還未使用過正則表達式,從本書中您將發(fā)現(xiàn)一個掌控數(shù)據(jù)的全新世界。如果使用過它們,您將會充分意識到本書空前的深度和廣度。如果您認為自己已經(jīng)掌握了所有需要掌握的正則表達式知識,本書將讓您大開眼界?!”M管正則表達式具有易用、靈活、功能強大的優(yōu)點,但我們往往未能充分利用它們。正則表達式可以將那些原本復(fù)雜且繁瑣的文本處理過程變成可自動處理的工作。正則表達式能夠為您節(jié)省時間、減少煩惱。它們可以用來為大量問題編制出一流的解決方案?!≌齽t表達式是一項重要技術(shù)。然而,在專家手中強大的工具同樣會因為使用上的不慎而帶來危險?!毒ㄕ齽t表達式》能夠幫助您跨越雷區(qū),成為專家。一旦掌握了正則表達式,它們將成為您的工具箱中極其重要、不可或缺的一部分。 《精通正則表達式(第二版)》已被全面更新,涵蓋了Perl 5.8及其他諸如Java、VB.NET、C#、Python、JavaScript、Tcl、Ruby等語言提供的全部新特性。本書用明晰、輕快的文筆,將原本復(fù)雜、乏味的主題清楚明白地展現(xiàn)在數(shù)以千計的程序員面前,并輔以一些真實世界中復(fù)雜問題的解決方案。《精通正則表達式》提供了大量可供直接使用的信息。 本書的主題包括:· 多種語言和工具不同版本之間的特性比較· 正則表達式引擎的工作機制· 優(yōu)化(提供主要方法)· 如何精確匹配· 針對特定語言的探討

作者簡介

暫缺《精通正則表達式:英文本》作者簡介

圖書目錄

Preface
1:Introductionc to Regular Expressions
Solving Real Problems
Regular Expressions as a Language
The Filename Analogy
The Language Analogy
The Regular-Expression Frame of Mind
If You Have Some Regular-Expression Experience
Searching Text Files:Egrep
Egrep Metacharacters
Start and End of the Line
Character Classes
Matching Any Character with Dot
Alternation
Ignoring Differences in Capitalization
Word Boundaries
In a Nutshell
Optional Items
Other Quantifiers:Repetition
Parentheses and Backreferences
The Great Escape
Expanding the Foundation
Linguistic Diversification
The Goal of a Regular Expression
A Few More Examples
Regular Expression Nomenclature
Improving on the Status Quo
Summary
Personal Glimpses
3:Extended Introductory Examples
About the Examples
A Short Introductioncto Perl
Matching Text with Regular Expressions
Toward a More Real-World Example
SidecEffects of a Successful Match
Intertwined Regular Expressions
Intermission
Modifying Text with Regular Expressions
Example: FormcLetter
Example:Prettifying a Stock Price
Automated Editing
A Small Mail Utility
Adding Commas to a Number with Lookaround
Text-to-HTML Conversion
That Doubled-Word Thing
3:Overview of Regular Expression Features and Flavors
A Casual Stroll Across the Regex Land scape
The Origins of Regular Expressions
At a Glance
Care and Handling of Regular Expressions
Integrated Handling
Procedural and Object-Oriented Handling
A Search-and-Replace Example
Search and Replace in Other Languages
Care and Handling:Summary
Strings,Character Encodings,and Modes
Strings as Regular Expressions
Character-Encoding Issues
Regex Modes and Match Modes
Common Metacharacters and Features
Character Representations
Character Classes and Class-L1ke Constructs
Anchors and other“Zero-Width Assertions”
Comments and Mode Modifiers
Grouping,Capturing,Conditionals,and Control
Guide to the AdVanced Chapters
4:The Mectanics of Exptession Protessing
Start Your Engines!
Two Kinds of Engines
New Standards
Regex Engine Types
From the Department of Redundancy Department
Testing the Engine Type
Match Basics
About the Examples
Rule l:The Match That Begins Earliest Wirls
Engine Pieces and Parts
Rule 2:The Standard Quantifiers Are Greedy
Regex-Directed Versus Text-Directed
NFA Engine:Regex-Directed
DFA Engine:Text-Directed
First ThOLIghts:NFA and DFA in Comparison
Backtracking.
A Really Crummy Analogy
Two Important Points on Backtracking
Saved States
Backtracking and Gteediness
More About Greediness and Backtracking
Problems of Gteediness.
Multi-Character“Quotes”
Using Lazy Qnantifiers
Greediness and Laziness Always Favor a Match
The Essence of Greediness,Laziness,and Backtracking.
Possessive Quantifiers and Atomic Grouping
Possessive Quantifiers,?+,★+,++,and{m,n}+
The Backtracking of Lookaround
Is Alternation Greedy?
Taking Advantage of ordered Alternation
NFA.DFA.a(chǎn)nd POSIX
“The Longest.Leftmost”
PoSIX and the Longest-Leftmost Rule
Speed and Efficiency
Summary:NFA and DFA in Comparison
Summary
5:Practical Regex Techniques
Regex Balancing Act
A Few Shon Examples
Continuing With Continuation Lines
Matching an IP Addtess
Working With Filenames
Matching Balanced Sets of Parentheses
Watching Out for Unwanted Matches
Matching Delimited Text
Knowing Your Data and Making Assumptions
Stripping Leading and Trailing Whitespace
HTML-Related Examples
Matching an HTML Tag
Matching an HTML Link
Examining an HTTP URL
Validating a Hostname
P1ucking out a URL in the Real World
Extended Examples
Keeping in Sync With Your Data
Parsing CSV Files
6: Crafting an Efficient Expression
A Sobering Example
A Simple Change-Placing Your Best Foot Forvcard
Efficiencv Ve-rses Correctness
Advancing Further--Localizing the Greediness
RealitV Check
A Global VieW of Backtracking
More Work for a PoSIX NFA
Work Required During a Non-Match
Being More Specific.
A1ternation Can Be Exoensive
Benchmarking
Know What You're Measuring
Benchmarking With Java
Benchmarking With VB.NET
Benchmarking With Python
Benchmarking With Ruby
Benchirlarking With Tcl
Common optimizations
No Free Lurich
Evervone’s Lunch is Dfifetent
The Mechailics of Regex Application
Pre-Application Optimizations
Optimizations With the Transmission
Optimizations of the Regex Itself
Techniques for Faster Expressions
Common Sense Techniques
Expose Literal Text
Expose Anchors
Lazy Versus Greedy:Be Specific
Split Into Multiple Regular Expressions
Mimic Initial-Character DiscriminaCion
use Atomic Grouping and Possessive Quantifiers
Lead the Engine to a Match
Unrolling the Loop
Method 1:Building a Regex From Past Experiences
The Real“Unrolling-the-Loop”Panern
Method 2:A ToD-Down View
Method 3:An Internet Hostname
observations
using Atomic Gtonping and PossessiVe Quantifiers
Short Unrolling Examples
Unrolling C Comments
The Freenowing Regex
A Helping Hand to Guide the Match
A Well-Guided Regex is a Fast Regex
Wrapup
In Summarg:Think!
7:Perl
ReguIar Expressi0128 as a Language Component
Perl’s Greatest Strength
Perl’s Greatest Weakness
Pefl’s Regex Flavor.
Regex operands and Regex Literals
HOW Regex Literals Are Parsed
Regex Modifiers
Regex-Related Perlisms
Expression ConteXt
Dynamic SCOpe and Regex Match Effects
Special Variables Modi6ed by a Match
The qr//operator and Regex objectS
Building and Using Regex objects
Viewing Regex objects
Using Regex objectS for Efficiency
  The Match operator
Match’s Regex operand
Specifying the Match Target operand
Diffetent Uses of the MatCh 0perator
Iterative Matching:Scalar Context,with/g
The Match operator's Environmental Relations
The Substitution operator
The Replacement operand
The/e Modifier
Context and Return Value
  The Split Operator
Basic Split
Returning Empty Elements
Split’s Special Regex operands
Split’s Match operand with Capturing Parentheses
  Fun with Perl Enhancements
Using a Dynamic Regex to Match Nested Pair5
Using the Embedded-Code C01"18truct
Using local jn an Embedded-Code Construct
A Warrling About Embedded Code and my Variables.
Matching Nested Constrtlcts with Enlbedded Code
overloading Regex Literals
Probleros with Regex-Ljteral overJoading
Minlicking Named Capture
Perl Efficiency Issues
“There's More Than one Way to Do It”
Regex Compilation,the/o Modifier qr//,and Efficiency.
Understanding the“Pre-Match”Copy
The Study Function
Benchmarking
Regex Debugging Information
Final Comments
8:Java
Judging a Regex Package
Technical Issues
Social and Political Issues
Obiect Models
A Few AbstraCt obiect Models
Growing Complexity
Packages,Packages,Packages
Why So Many“Perl5”Flavors?
Lies.Damn Lies.a(chǎn)nd Benchmarks
Recommendations
Sun’s Regex Package
Regex Flavor
using java.util.regex
The Pattern.compile()Factory
The Matcher Obiect
other Pattern Methods
A Quick Look at Jakarta一ORO
ORO’s Perl5Util
A Mini Perl5Util Reference
Using ORO’s Underlying Classes
9: NET
.NET’s Regex Flavor
Additional Comments on the Flavor
Using.NET Regular Expressions
Regex Quickstart
Package overview
Core obiect overview
Core Object Details
Creating Regex Objects
Using Regex Objects
Using Match Objects
Using Group Objects
Static "Convenience" Functions
Regex Caching
Support Functions
Advanced .NET
Regex Assemblies
Matching Nested Constructs
Capture Objects
Index

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號 鄂公網(wǎng)安備 42010302001612號