Regular-Expression

Aus SiteparkWiki
Zur Navigation springen Zur Suche springen
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)