(Ebook) Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET by Tony Stubblebine ISBN 9780596514273, 0596514271 - Download the ebook now to start reading without waiting
(Ebook) Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET by Tony Stubblebine ISBN 9780596514273, 0596514271 - Download the ebook now to start reading without waiting
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312
https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018
(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-
arco-master-the-sat-subject-test-math-levels-1-2-2326094
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth Study:
the United States, 1919-41 2nd Edition by Benjamin Harrison ISBN
9781398375147, 9781398375048, 1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044
https://ebooknice.com/product/java-regular-expressions-taming-the-
java-util-regex-engine-1786470
https://ebooknice.com/product/introducing-regular-expressions-53645866
https://ebooknice.com/product/regex-quick-syntax-reference-
understanding-and-using-regular-expressions-55205022
https://ebooknice.com/product/regex-quick-syntax-reference-
understanding-and-using-regular-expressions-36222262
Regular Expression
Pocket Reference
SECOND EDITION
Regular Expression
Pocket Reference
Tony Stubblebine
Printing History:
August 2003: First Edition.
July 2007: Second Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly Media, Inc. The Pocket Reference series
designations, Regular Expression Pocket Reference, the image of owls, and
related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish
their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the
designations have been printed in caps or initial caps.
Java™ is a trademark of Sun Microsystems, Inc. Microsoft Internet Explorer
and .NET are registered trademarks of Microsoft Corporation. Spider-Man
is a registered trademark of Marvel Enterprises, Inc.
While every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.
ISBN-10: 0-596-51427-1
ISBN-13: 978-0-596-51427-3
[T]
Contents
v
.NET and C# 38
Supported Metacharacters 38
Regular Expression Classes and Interfaces 42
Unicode Support 47
Examples 47
Other Resources 49
PHP 50
Supported Metacharacters 50
Pattern-Matching Functions 54
Examples 56
Other Resources 58
Python 58
Supported Metacharacters 58
re Module Objects and Functions 61
Unicode Support 64
Examples 65
Other Resources 66
RUBY 66
Supported Metacharacters 67
Object-Oriented Interface 70
Unicode Support 75
Examples 75
JavaScript 77
Supported Metacharacters 77
Pattern-Matching Methods and Objects 79
Examples 82
Other Resources 83
vi | Contents
PCRE 83
Supported Metacharacters 84
PCRE API 89
Unicode Support 92
Examples 92
Other Resources 96
Apache Web Server 96
Supported Metacharacters 96
RewriteRule 99
Matching Directives 102
Examples 102
vi Editor 103
Supported Metacharacters 103
Pattern Matching 106
Examples 108
Other Resources 108
Shell Tools 109
Supported Metacharacters 109
Other Resources 114
Index 115
Contents | vii
Regular Expression Pocket
Reference
1
Conventions Used in This Book
The following typographical conventions are used in this
book:
Italic
Used for emphasis, new terms, program names, and
URLs
Constant width
Used for options, values, code fragments, and any text
that should be typed literally
Constant width italic
Used for text that should be replaced with user-supplied
values
Constant width bold
Used in examples for commands or other text that
should be typed literally by the user
Acknowledgments
Jeffrey E. F. Friedl’s Mastering Regular Expressions (O’Reilly)
is the definitive work on regular expressions. While writing, I
relied heavily on his book and his advice. As a convenience,
this book provides page references to Mastering Regular
Expressions, Third Edition (MRE) for expanded discussion of
regular expression syntax and concepts.
Nat Torkington and Linda Mui were excellent editors who
guided me through what turned out to be a tricky first edi-
tion. This edition was aided by the excellent editorial skills of
Andy Oram. Sarah Burcham deserves special thanks for
giving me the opportunity to write this book, and for her
contributions to the “Shell Tools” section. More thanks for
the input and technical reviews from Jeffrey Friedl, Philip
Hazel, Steve Friedl, Ola Bini, Ian Darwin, Zak Greant, Ron
Hitchens, A.M. Kuchling, Tim Allwine, Schuyler Erle, David
Lents, Rabble, Rich Bowan, Eric Eisenhart, and Brad Merrill.
Character representations
Many implementations provide shortcuts to represent char-
acters that may be difficult to input. (See MRE 115–118.)
Character shorthands
Most implementations have specific shorthands for the
alert, backspace, escape character, form feed, newline,
carriage return, horizontal tab, and vertical tab
characters. For example, \n is often a shorthand for the
newline character, which is usually LF (012 octal), but
can sometimes be CR (015 octal), depending on the oper-
ating system. Confusingly, many implementations use \b
to mean both backspace and word boundary (position
between a “word” character and a nonword character).
For these implementations, \b means backspace in a char-
acter class (a set of possible characters to match in the
string), and word boundary elsewhere.
Octal escape: \num
Represents a character corresponding to a two- or three-
digit octal number. For example, \015\012 matches an
ASCII CR/LF sequence.
Hex and Unicode escapes: \xnum, \x{num}, \unum, \Unum
Represent characters corresponding to hexadecimal num-
bers. Four-digit and larger hex numbers can represent the
range of Unicode characters. For example, \x0D\x0A
matches an ASCII CR/LF sequence.
Control characters: \cchar
Corresponds to ASCII control characters encoded with
values less than 32. To be safe, always use an uppercase
char—some implementations do not handle lowercase
COMPARATIVE PHILOLOGY.
Order I. Isolating.
Order II. Agglutinative: (Sub-orders, Polysynthetic and
Incorporating).
Order III. Inflectional: (Sub-order, Analytic).
ROOTS OF LANGUAGE.
1. Dig.
2. Plat, weave, sew, bind.
3. Crush, pound, destroy, waste, rub, smooth.
4. Sharpen.
5. Smear, colour, knead, harden.
6. Scratch.
7. Bite, eat.
8. Divide, share, eat.
9. Cut.
10. Gather, observe.
11. Stretch, spread.
12. Mix.
13. Scatter, strew.
14. Sprinkle, drip, wet.
15a. Shake, tremble, quiver, flicker.
15b. Shake, mentally, be angry, abashed, fearfully, etc.
16. Throw down, fall.
17. Fall to pieces.
18. Shoot, throw at.
19. Pierce, split.
20. Join, fight, check.
21. Tear.
22. Break, smash.
23. Measure.
24. Blow.
25. Kindle.
26. Milk, yield.
27. Pour, flow, rush.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com