From 1907fefb573480d49ad908d043f6a303dfdf2162 Mon Sep 17 00:00:00 2001 From: Sven Riwoldt Date: Mon, 14 Sep 2026 20:28:21 +0200 Subject: [PATCH] Lisp und Regex --- Lisp.md | 8 ++++++ Regular Expressions Cheat Sheet.md | 39 +++++++++++++----------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/Lisp.md b/Lisp.md index 5ac8459..a17ecc0 100644 --- a/Lisp.md +++ b/Lisp.md @@ -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` - 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) diff --git a/Regular Expressions Cheat Sheet.md b/Regular Expressions Cheat Sheet.md index 47bcf1d..a1baa57 100644 --- a/Regular Expressions Cheat Sheet.md +++ b/Regular Expressions Cheat Sheet.md @@ -12,29 +12,24 @@ 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. | +| | | +| -------- | ------------------------------------------------------------------------------- | +| `\` | 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. | -​ - -+ - - - - 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'.