Buy Mastering Regular Expressions by Jeffrey E.F. Friedl
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Web programming > Mastering Regular Expressions
Mastering Regular Expressions

Mastering Regular Expressions


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Regular expressions are a powerful tool for manipulating text and data. They are now standard features in a range of languages and popular tools, including Perl, Java, VB.NET and C# (and any language using the .NET Framework), PHP, Python, Ruby, Tcl, MySQL, awk, and Emacs. This volume has been 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. It offers solutions to complex real-world problems and features information that can be put to immediate use. Topics covered include: a comparison of features among different versions of many languages and tools; how the regular expression engine works; optimization; matching just what you want, but not what you don't want; and sections and chapters on individual languages.

Table of Contents:
Preface 1: Introduction 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 2: Extended Introductory Examples About the Examples A Short Introduction to Perl Matching Text with Regular Expressions Toward a More Real-World Example Side Effects of a Successful Match Intertwined Regular Expressions Intermission Modifying Text with Regular Expressions Example: Form Letter 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 Landscape 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-Like Constructs Anchors and Other Zero-Width Assertions Comments and Mode Modifiers Grouping, Capturing, Conditionals, and Control Guide to the Advanced Chapters 4: The Mechanics of Expression Processing 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 1: The Match That Begins Earliest Wins 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 Thoughts: NFA and DFA in Comparison Backtracking A Really Crummy Analogy Two Important Points on Backtracking Saved States Backtracking and Greediness More About Greediness and Backtracking Problems of Greediness Multi-Character Quotes Using Lazy Quantifiers 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, and POS "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 Short Examples Continuing with Continuation Lines Matching an IP Address 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 Plucking 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 Forward Efficiency Verses Correctness Advancing Further Localizing the Greediness Reality Check A Global View of Backtracking More Work for a POSIX NFA Work Required During a Non-Match Being More Specific Alternation Can Be Expensive Benchmarking Know What You're Measuring Benchmarking with Java Benchmarking with VB.NET Benchmarking with Python Benchmarking with Ruby Benchmarking with Tcl Common Optimizations No Free Lunch Everyone's Lunch is Different The Mechanics 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 Discrimination 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 Pattern Method 2: A Top-Down View Method 3: An Internet Hostname Observations Using Atomic Grouping and Possessive Quantifiers Short Unrolling Examples Unrolling C Comments The Freeflowing Regex A Helping Hand to Guide the Match A Well-Guided Regex is a Fast Regex Wrapup In Summary: Think! 7: Perl Regular Expressions as a Language Component Perl's Greatest Strength Perl's Greatest Weakness Perl'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 Modified 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 Different Uses of the Match Operator Iterative Matching: Scalar Context, with /g The Match Operators Environmental Relations The Substitution Operator The Replacement Operand The /e Modifier Context and Return Value The Split Operator Basic Split Returning Empty Elements Splits Special Regex Operands Splits Match Operand with Capturing Parentheses Fun with Perl Enhancements Using a Dynamic Regex to Match Nested Pairs Using the Embedded-Code Construct Using local in an Embedded-Code Construct A Warning About Embedded Code and my Variables Matching Nested Constructs with Embedded Code Overloading Regex Literals Problems with Regex-Literal Overloading Mimicking 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 Object Models A Few Abstract Object Models Growing Complexity Packages, Packages, Packages Why So Many Perl5 Flavors? Lies, Damn Lies, and Benchmarks Recommendations Sun's Regex Package Regex Flavor Using java.util.regex The Pattern.compile() Factory The Matcher Object 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 Object 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

About the Author :
Jeffrey Friedl was raised in the countryside of Rootstown, Ohio, and had aspirations of being an astronomer until one day noticing a TRS-80 Model I sitting unused in the corner of the chem lab (bristling with a full 16k RAM, no less). He eventually began using UNIX (and regular expressions) in 1980. With degrees in computer science from Kent (B.S.) and the University of New Hampshire (M.S.), he is now an engineer with Omron Corporation, Kyoto, Japan. He lives in Nagaokakyou-city with Tubby, his long-time friend and Teddy Bear, in a tiny apartment designed for a (Japanese) family of three. Jeffrey applies his regular-expression know-how to make the world a safer place for those not bilingual in English and Japanese. He is active in a variety of language-related projects, both in print and on the Web. When faced with the daunting task of filling his copious free time, Jeffrey enjoys riding through the mountainous countryside of Japan on his Honda CB-1. At the age of 30, he finally decided to put his 6'4" height to some use, and joined the Omron company basketball team. While finalizing the manuscript for Mastering Regular Expressions., he took time out to appear in his first game, scoring five points in nine minutes of play, which he feels is pretty darn good for a geek. When visiting his family in The States, Jeffrey enjoys dancing a two-step with his mom, binking old coins with his dad, and playing schoffkopf with his brothers and sisters.


Best Sellers


Product Details
  • ISBN-13: 9780596002893
  • Publisher: O'Reilly Media
  • Publisher Imprint: O'Reilly Media
  • Edition: Revised edition
  • Language: English
  • Weight: 768 gr
  • ISBN-10: 0596002890
  • Publisher Date: 27 Aug 2002
  • Binding: Paperback
  • Height: 232 mm
  • Returnable: N
  • Width: 179 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Mastering Regular Expressions
O'Reilly Media -
Mastering Regular Expressions
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Mastering Regular Expressions

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    Fresh on the Shelf


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!