Rust erweitert

This commit is contained in:
2026-09-17 08:12:04 +02:00
parent 815facc1cf
commit 9610638462
3 changed files with 180 additions and 51 deletions
+24 -29
View File
@@ -12,38 +12,33 @@ https://serverdiscounter.com/blog/2026-01-26-regex-grundlagen
## Special Characters
| | |
| ---------- | ------------------------------------------------------------------------------- |
| `\` | Escapet Sonderzeichen oder kennzeichnet eine spezielle Sequenz |
| `.` | Entspricht einem beliebigen einzelnen Zeichen mit Ausnahme eines Zeilenumbruchs |
| `^` | Matches the start of the string. |
| `$` | Matches the end of the string​ |
| `*` | Greedily matches 0 or more repetitions of the preceding RE. |
| `*?` | Matches 0 or more repetitions of the preceding RE. |
| `+` | Greedily matches 1 or more repetitions of the preceding RE. |
| `+?` | Matches 1 or more repetitions of the preceding RE. |
| `?` | Greedily matches 0 or 1 repetitions of the preceding RE. |
| `??` | Matches 0 or 1 repetitions of the preceding RE. |
| `A\|B` | Matches A, if A is unmatched then matches B, where A and B are arbitrary REs. |
| `{m}` | Matches exactly m many repetitions of the previous RE. |
| `{m,n}` | Greedily matches from m many to n many repetitions of the previous RE. |
| `{m,n}?` | Matches m many to n many repetitions of the previous RE. |
| `[...]` | Indicates a set of characters to match. |
| `[amk]` | Matches 'a', 'm', or 'k'. |
| [a-z] | Matches 'a' through 'z'. |
| `[a-f0-7]` | Matches 'a' through 'f' or '0' through '7'. |
| `[a\-z]` | Matches 'a', '-', or 'z'. |
| | | |
| :------: | :------------------------------------------------------------------------------ | :------------------------------------------------------------------------ |
| `\` | Escapet Sonderzeichen oder kennzeichnet eine spezielle Sequenz | |
| `.` | Entspricht einem beliebigen einzelnen Zeichen mit Ausnahme eines Zeilenumbruchs | |
| `^` | Matches the start of the string. | |
| `$` | Matches the end of the string​ | |
| `*` | Greedily matches 0 or more repetitions of the preceding RE. | |
| `*?` | Matches 0 or more repetitions of the preceding RE. | |
| `+` | Greedily matches 1 or more repetitions of the preceding RE. | |
| `+?` | Matches 1 or more repetitions of the preceding RE. | |
| `?` | Greedily matches 0 or 1 repetitions of the preceding RE. | |
| `??` | Matches 0 or 1 repetitions of the preceding RE. | |
| `A\|B` | Matches A, if A is unmatched then matches B, where A and B are arbitrary REs. | |
| `{m}` | Matches exactly m many repetitions of the previous RE. | |
| `{m,n}` | Greedily matches from m many to n many repetitions of the previous RE. | |
| `{m,n}?` | Matches m many to n many repetitions of the previous RE. | |
| `[...]` | Indicates a set of characters to match. | |
| | `[amk]` | Matches 'a', 'm', or 'k'. |
| | `[a-z]` | Matches 'a' through 'z'. |
| | `[a-f0-7]` | Matches 'a' through 'f' or '0' through '7'. |
| | `[a\-z]` | Matches 'a', '-', or 'z'. |
| | `[a-]` | Matches 'a' or '-'. |
| | `[-a]` | Matches 'a' or '-'. |
| | `[(+*)]` | Matches '(', '+', '*', or ')'. `[]` matches special characters literally. |
​
[a-] Matches 'a' or '-'.
[-a] Matches 'a' or '-'.
[(+*)] Matches '(', '+', '*', or ')'. [] matches special characters literally.
[\w] Matches the character class for '\w'. See character classes.
[^5] Matches anything other than '5'. '^' forms the complementary set only as the first character in a set.
[]()] Matches ']', '(', and ')'. ']' is taken literally only as the first character in a set.