Mastering regular expressions
Regular expressions are an extremely powerful tool for manipulating text and data. They are now standard features in a wide range of languages and popular tools, including Perl, Python, Ruby, Java, VB.NET and C# (and any language using the .NET Framework), PHP, and MySQL. If you don't use regu...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Beijing ; Sebastapol, California :
O'Reilly
2012.
[2006] |
Edición: | 3rd ed |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627235606719 |
Tabla de Contenidos:
- Table of Contents; Preface; The Need for This Book; Intended Audience; How to Read This Book; Organization; The Details; Tool-Specific Information; Typographical Conventions; Exercises; Links, Code, Errata, and Contacts; Safari®Enabled; Personal Comments and Acknowledgments; Ch. 1: Introduction to Regular Expressions; Solving Real Problems; Regular Expressions as a Language; The Filename Analogy; The Language Analogy; The goal of this book; The Regular-Expression Frame of Mind; If You Have Some Regular-Expression Experience; Searching Text Files: Egrep; Egrep Metacharacters
- Start and End of the LineCharacter Classes; Matching any one of several characters; Negated character classes; Matching Any Character with Dot; Alternation; Matching any one of several subexpressions; Ignoring Differences in Capitalization; Word Boundaries; In a Nutshell; Optional Items; Other Quantifiers: Repetition; Defined range of matches: intervals; Parentheses and Backreferences; The Great Escape; Expanding the Foundation; Linguistic Diversification; The Goal of a Regular Expression; A Few More Examples; Variable names; A string within double quotes; Dollar amount (with optional cents)
- An HTTP/HTML URLAn HTML tag; Time of day, such as ""9:17 am"" or ""12:30 pm""; Regular Expression Nomenclature; Regex; Matching; Metacharacter; Flavor; Subexpression; Character; Improving on the Status Quo; Summary; Personal Glimpses; Ch. 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; A short aside--metacharacters galore; Generic ""whitespace"" with \s; Intermission; Modifying Text with Regular Expressions
- Example: Form LetterExample: Prettifying a Stock Price; Automated Editing; A Small Mail Utility; Real-world problems, real-world solutions; The ""real"" real world; Adding Commas to a Number with Lookaround; Lookaround doesn't ""consume"" text; A few more lookahead examples; Back to the comma example...; Word boundaries and negative lookaround; Commafication without lookbehind; Text-to-HTML Conversion; Cooking special characters; Separating paragraphs; ""Linkizing"" an email address; Matching the username and hostname; Putting it together; ""Linkizing"" an HTTP URL; Building a regex library
- Why `' and ` @' sometimes need to be escapedThat Doubled-Word Thing; Moving bits around: operators, functions, and objects; Ch. 3: Overview of Regular Expressions Features and Flavors; Regular Expressions and Cars; In This Chapter; A Casual Stroll Across the Regex Landscape; The Origins of Regular Expressions; Grep's metacharacters; Grep evolves; Egrep evolves; Other species evolve; POSIX--An attempt at standardization; Henry Spencer's regex package; Perl evolves; A partial consolidation of flavors; Versions as of this book; At a Glance; Care and Handling of Regular Expressions
- Integrated Handling