XML technologies / Regular expressions / Features and dialects / Common metacharacters
(Excerpt from "Regular expressions" by Jeffrey E. F. Friedl)
The rest of this chapter covers metacharacters and features implemented by various programs; the next table provides an overview. Not every aspect is covered, and none of the programs supports all the listed metacharacters. In a sense, this recaps what we encountered in Introduction to regular expressions and Extended introductory examples, but in a broader context and with the foundations established at the beginning of Features and dialects. Reading it once will suffice for later chapters; you can always return here for details.
Some programming tools implement every imaginable notation; others freely redefine familiar metacharacters. I occasionally comment on particular implementations, but do not explore individual tools deeply here. This section covers common metacharacters, their uses, and important caveats. For anything further, consult the tool’s own documentation.
The table outlines the following sections, with page references for each feature and metacharacter.
Table: constructs covered in this section.
Character representation | |
|---|---|
Shorthand metacharacters: | |
see Octal escapes... | Octal escapes: |
Hexadecimal escapes and Unicode escapes: | |
Control characters: | |
Character classes and related constructs | |
Ordinary classes: | |
Almost any character: dot | |
Exactly one byte: | |
Unicode sequence for combining characters: | |
see Shorthands... | Character-class shorthands: |
Unicode properties, scripts, and blocks: | |
Set operations on character classes: | |
POSIX bracket expression: character class: | |
POSIX bracket expression: collating sequence: | |
POSIX bracket expression: character equivalence: | |
Emacs syntax classes | |
Anchors and other zero-width assertions | |
Beginning of line or string: | |
End of line or string: | |
Start of the next match or end of the previous one: | |
Word boundaries: | |
see Lookahead... | Lookahead: |
Comments and mode modifiers | |
Mode modifiers: | |
Scoped mode modifiers: | |
see Comments... | Comments: |
see Literal text... | Literal text: |
Grouping and capturing parentheses, logical and greedy constructs | |
Grouping and capturing parentheses: | |
see Grouping only... | Grouping-only, noncapturing parentheses: |
Named subexpressions: | |
see Atomic groups... | Atomic groups: |
see Alternation... | Alternation: |
Conditional regular expressions: | |
Greedy quantifiers: | |
Lazy quantifiers: | |
Possessive quantifiers: | |
German edition copyright © 2008 by O’Reilly Verlag GmbH & Co. KG
You may print the online version for private use.
Otherwise, this chapter from "Reguläre Ausdrücke" is subject to the same terms as the bound edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstr. 81, 50670 Köln
back to top