Regular-Expression: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: {{Überarbeiten}} ==Beschreibung== Reguläre Ausdrücke sind Muster, mit denen man den Aufbau von Zeichenketten beschreibt. ==Characters== {| class="prettytable" |- cl...) |
|||
| Zeile 49: | Zeile 49: | ||
| <code>\cx</code> | | <code>\cx</code> | ||
| The control character corresponding to x | | The control character corresponding to x | ||
| + | |} | ||
| + | |||
| + | ==Character classes== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Predefined character classes== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==POSIX character classes (US-ASCII only)== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Classes for Unicode blocks and categories== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Boundary matchers== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Greedy quantifiers== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Reluctant quantifiers== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | |||
| + | ==Possessive quantifiers== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | ==Logical operators== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | ==Back references== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | ==Quotation== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | ==Special constructs (non-capturing)== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |- | ||
| + | | <code>xxx</code> | ||
| + | | xxx | ||
| + | |} | ||
| + | |||
| + | ==Embedded flag expressions== | ||
| + | {| class="prettytable" | ||
| + | |- class="hintergrundfarbe1" | ||
| + | ! Ausdruck || Bedeutung | ||
| + | |- | ||
| + | | <code>(?u)</code> | ||
| + | | Pattern.UNICODE_CASE | ||
| + | |- | ||
| + | | <code>(?s)</code> | ||
| + | | Pattern.DOTALL | ||
| + | |- | ||
| + | | <code>(?m)</code> | ||
| + | | Pattern.MULTILINE | ||
| + | |- | ||
| + | | <code>(?i)</code> | ||
| + | | Pattern.CASE_INSENSITIVE | ||
| + | |- | ||
| + | | <code>(?x)</code> | ||
| + | | Pattern.COMMENTS | ||
| + | |- | ||
| + | | <code>(?d)</code> | ||
| + | | Pattern.UNIX_LINES | ||
| + | |- | ||
| + | | <code>---</code> | ||
| + | | Pattern.CANON_EQ (not available) | ||
|} | |} | ||
Version vom 15. Juni 2008, 06:56 Uhr
| Dieser Artikel bedarf einer Überarbeitung. Näheres ist auf der Diskussionsseite angegeben. Hilf bitte mit ihn zu verbessern und entferne anschließend diese Markierung. |
Beschreibung
Reguläre Ausdrücke sind Muster, mit denen man den Aufbau von Zeichenketten beschreibt.
Characters
| Ausdruck | Bedeutung |
|---|---|
x
|
The character x |
\\
|
The backslash character |
\0n
|
The character with octal value 0n (0 <= n <= 7) |
\0nn
|
The character with octal value 0nn (0 <= n <= 7) |
\0mnn
|
The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7) |
\xhh
|
The character with hexadecimal value 0xhh |
\uhhhh
|
The character with hexadecimal value 0xhhhh |
\t
|
The tab character ('\u0009') |
\n
|
The newline (line feed) character ('\u000A') |
\r
|
The carriage-return character ('\u000D') |
\f
|
The form-feed character ('\u000C') |
\a
|
The alert (bell) character ('\u0007') |
\e
|
The escape character ('\u001B') |
\cx
|
The control character corresponding to x |
Character classes
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Predefined character classes
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
POSIX character classes (US-ASCII only)
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Classes for Unicode blocks and categories
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Boundary matchers
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Greedy quantifiers
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Reluctant quantifiers
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Possessive quantifiers
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Logical operators
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Back references
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Quotation
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Special constructs (non-capturing)
| Ausdruck | Bedeutung |
|---|---|
xxx
|
xxx |
xxx
|
xxx |
Embedded flag expressions
| Ausdruck | Bedeutung |
|---|---|
(?u)
|
Pattern.UNICODE_CASE |
(?s)
|
Pattern.DOTALL |
(?m)
|
Pattern.MULTILINE |
(?i)
|
Pattern.CASE_INSENSITIVE |
(?x)
|
Pattern.COMMENTS |
(?d)
|
Pattern.UNIX_LINES |
---
|
Pattern.CANON_EQ (not available) |