Share
Fr. 66.00
Michael Fitzgerald, Fitzgerald Michael
Introducing Regular Expressions - Unraveling Regular Expressions, Step-by-Step
English · Paperback / Softback
Shipping usually within 3 to 5 weeks
Description
If you re a programmer new to regular expressions, this easy-to-follow guide is a great place to start. You ll learn the fundamentals step-by-step with the help of numerous examples, discovering first-hand how to match, extract, and transform text by matching specific words, characters, and patterns.
Regular expressions are an essential part of a programmer s toolkit, available in various Unix utlilities as well as programming languages such as Perl, Java, JavaScript, and C sharp. When you ve finished this book, you ll be familiar with the most commonly used syntax in regular expressions, and you ll understand how using them will save you considerable time. Discover what regular expressions are and how they work Learn many of the differences between regular expressions used with command-line tools and in various programming languages Apply simple methods for finding patterns in text, including digits, letters, Unicode characters, and string literals Learn how to use zero-width assertions and lookarounds Work with groups, backreferences, character classes, and quantifiers Use regular expressions to mark up plain text with HTML5
List of contents
Preface;
Who Should Read This Book;
What You Need to Use This Book;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: What Is a Regular Expression?;
1.1 Getting Started with Regexpal;
1.2 Matching a North American Phone Number;
1.3 Matching Digits with a Character Class;
1.4 Using a Character Shorthand;
1.5 Matching Any Character;
1.6 Capturing Groups and Back References;
1.7 Using Quantifiers;
1.8 Quoting Literals;
1.9 A Sample of Applications;
1.10 What You Learned in Chapter 1;
1.11 Technical Notes;
Chapter 2: Simple Pattern Matching;
2.1 Matching String Literals;
2.2 Matching Digits;
2.3 Matching Non-Digits;
2.4 Matching Word and Non-Word Characters;
2.5 Matching Whitespace;
2.6 Matching Any Character, Once Again;
2.7 Marking Up the Text;
2.8 What You Learned in Chapter 2;
2.9 Technical Notes;
Chapter 3: Boundaries;
3.1 The Beginning and End of a Line;
3.2 Word and Non-word Boundaries;
3.3 Other Anchors;
3.4 Quoting a Group of Characters as Literals;
3.5 Adding Tags;
3.6 What You Learned in Chapter 3;
3.7 Technical Notes;
Chapter 4: Alternation, Groups, and Backreferences;
4.1 Alternation;
4.2 Subpatterns;
4.3 Capturing Groups and Backreferences;
4.4 Non-Capturing Groups;
4.5 What You Learned in Chapter 4;
4.6 Technical Notes;
Chapter 5: Character Classes;
5.1 Negated Character Classes;
5.2 Union and Difference;
5.3 POSIX Character Classes;
5.4 What You Learned in Chapter 5;
5.5 Technical Notes;
Chapter 6: Matching Unicode and Other Characters;
6.1 Matching a Unicode Character;
6.2 Matching Characters with Octal Numbers;
6.3 Matching Unicode Character Properties;
6.4 Matching Control Characters;
6.5 What You Learned in Chapter 6;
6.6 Technical Notes;
Chapter 7: Quantifiers;
7.1 Greedy, Lazy, and Possessive;
7.2 Matching with *, +, and ?;
7.3 Matching a Specific Number of Times;
7.4 Lazy Quantifiers;
7.5 Possessive Quantifiers;
7.6 What You Learned in Chapter 7;
7.7 Technical Notes;
Chapter 8: Lookarounds;
8.1 Positive Lookaheads;
8.2 Negative Lookaheads;
8.3 Positive Lookbehinds;
8.4 Negative Lookbehinds;
8.5 What You Learned in Chapter 8;
8.6 Technical Notes;
Chapter 9: Marking Up a Document with HTML;
9.1 Matching Tags;
9.2 Transforming Plain Text with sed;
9.3 Appending Tags;
9.4 Transforming Plain Text with Perl;
9.5 What You Learned in Chapter 9;
9.6 Technical Notes;
Chapter 10: The End of the Beginning;
10.1 Learning More;
10.2 Notable Tools, Implementations, and Libraries;
10.3 Matching a North American Phone Number;
10.4 Matching an Email Address;
10.5 What You Learned in Chapter 10;
Regular Expression Reference;
Regular Expressions in QED;
Metacharacters;
Character Shorthands;
Whitespace;
Unicode Whitespace Characters;
Control Characters;
Character Properties;
Script Names for Character Properties;
POSIX Character Classes;
Options/Modifiers;
ASCII Code Chart with Regex;
Technical Notes;
Regular Expression Glossary;
Colophon;
About the author
MICHAEL FITZGERALD is principal of Wy'east Communications, a writing and training consultancy specializing in XML. He is Series Editor for the Wiley XML Essentials series and author of XSL Essentials and XML Schema Essentials (both forthcoming from Wiley). He is also Series Architect for Quessing Courseware Corporation's XML training series.
Summary
Regular expressions remain a difficult part of the puzzle when learning how to program. Commonly used for sifting through large chunks of text, regexes are incredibly powerful although they may appear daunting to the newcomer. And variations among languages and environments make them even harder to master.
Report
"[...] viele Bücher über diese Thematik sind doch eher etwas für Masochisten [...]. Anders die Neuerscheinung Introducing Regular Expressions aus dem O'Reilly-Verlag. Der Autor Michael Fitzgerald verspricht und bietet eine hervorragende Einführung [...] In zahlreichen Beispielen von steigender Komplexität werden nicht nur die notwendigen Grundlagen wie Pattern Matching, Alternation, Unicode und diverse Werkzeuge wie SED in verständlicher Art und Weise dargestellt. Ein gesondertes Kapitel beschäftigt sich mit dem Mark-Up von HTML-Dokumenten. Abschließend findet sich die obligatorische Referenz. Und - man mag es es angesichts dieses Themas kaum glauben - all diese Inhalte werden in lesbarer und unterhaltsamer Form dargestellt. [...] Sehr lesenswert! - macherzin.net, September 2012
Product details
Authors | Michael Fitzgerald, Fitzgerald Michael |
Publisher | O'Reilly Media |
Languages | English |
Product format | Paperback / Softback |
Released | 01.08.2012 |
EAN | 9781449392680 |
ISBN | 978-1-4493-9268-0 |
No. of pages | 154 |
Weight | 248 g |
Illustrations | w. ill. |
Subjects |
Natural sciences, medicine, IT, technology
> IT, data processing
> Programming languages
COMPUTERS / Programming / General, Programming Techniques, wildcard, awk, glob, pattern, greedy |
Customer reviews
No reviews have been written for this item yet. Write the first review and be helpful to other users when they decide on a purchase.
Write a review
Thumbs up or thumbs down? Write your own review.