Lisp und Regex

This commit is contained in:
2026-09-14 20:28:21 +02:00
parent b331e333ca
commit 1907fefb57
2 changed files with 25 additions and 22 deletions
+8
View File
@@ -40,6 +40,14 @@ Beispiel
**`setq` / `setf`**: Ändert den Wert einer bereits existierenden Variablen oder erzeugt (in manchen Lisp-Dialekten) implizit eine globale Variable, was jedoch unsauber ist. `setf` ist der universelle Zuweisungsoperator. **`setq` / `setf`**: Ändert den Wert einer bereits existierenden Variablen oder erzeugt (in manchen Lisp-Dialekten) implizit eine globale Variable, was jedoch unsauber ist. `setf` ist der universelle Zuweisungsoperator.
`setq` - einfache Variablenzuweisung
setf - allgemeine Zuweisung
`setf` kann nicht nur Variablen setzen, sondern praktisch alles, wofür Lisp eine passende **Schreibstelle (place)** kennt:
(setf *mein-wert* 100) (setf *mein-wert* 100)
+7 -12
View File
@@ -13,7 +13,7 @@ https://serverdiscounter.com/blog/2026-01-26-regex-grundlagen
## Special Characters ## Special Characters
| | | | | |
| ---- | ------------------------------------------------------------------------------- | | -------- | ------------------------------------------------------------------------------- |
| `\` | Escapet Sonderzeichen oder kennzeichnet eine spezielle Sequenz | | `\` | Escapet Sonderzeichen oder kennzeichnet eine spezielle Sequenz |
| `.` | Entspricht einem beliebigen einzelnen Zeichen mit Ausnahme eines Zeilenumbruchs | | `.` | Entspricht einem beliebigen einzelnen Zeichen mit Ausnahme eines Zeilenumbruchs |
| `^` | Matches the start of the string. | | `^` | Matches the start of the string. |
@@ -22,20 +22,15 @@ https://serverdiscounter.com/blog/2026-01-26-regex-grundlagen
| `*?` | 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. | | `+` | Greedily matches 1 or more repetitions of the preceding RE. |
| `+?` | 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. | | `?` | Greedily matches 0 or 1 repetitions of the preceding RE. |
| ?? | 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. |
​ ​
+
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. [...] Indicates a set of characters to match.
[amk] Matches 'a', 'm', or 'k'. [amk] Matches 'a', 'm', or 'k'.
[a-z] Matches 'a' through 'z'. [a-z] Matches 'a' through 'z'.