From 2f88bf834421ae1951fa17648e326e8ce060e1e4 Mon Sep 17 00:00:00 2001 From: danrega <16720986+danrega@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:14:54 +0100 Subject: [PATCH] Update content --- 07_String_Processing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07_String_Processing.md b/07_String_Processing.md index 0a8051c..c6c87af 100644 --- a/07_String_Processing.md +++ b/07_String_Processing.md @@ -1473,7 +1473,7 @@ Repetitions and Alternatives | `x{m,}` | Exactly `m` or more repetitions | `ab{2,}` | abc abbc abbbc a ac | abc **abb**c **abbb**c a ac | **ab**c ... | | `x?` | Optional `x`, i.e. zero or one time | `ab?` | abc abbc abbbc a ac | **ab**c **ab**bc **ab**bbc **a** **a**c | ... **ac** | | `x\|y` | Matching alternatives, i. e. `x` or `y` | 1. `b\|2`
2. `b(a\|u)t` | 1. abc 123
2. bit bat but bet | 1. b, 2
2. bat, but | 1. a, c, 1, 3
2. bit, bet | -| `x*?` | `x*` captures greedily, i.e. as much as possible, while `x*?` captures non-greedily, i.e. as few as possible | 1. `bc*?`
2. `a(.*?)#` | 1. abcd abccccd ab
2. abc#defgh#i | 1. a**b**cd a**b**ccccd a**b**
2. **abc#**defgh#i | 1. a**bc**d a**bcccc**d a**b** (result for `bc*`)
2. **abc#defgh#**i (result for `a(.*)#`) | +| `x*?` | `x*` captures greedily, i.e. as much as possible, while `x*?` captures non-greedily, i.e. as few as possible | 1. `bc*?`
2. `a(.*?)#` | 1. abcd abccccd ab
2. abc#defgh#i | 1. a**b**cd a**b**ccccd a**b**
2. **abc#**defgh#i | 1. a**bc**d a**bcccc**d a**b** (result for `bc*`)
2. **abc#defgh#**i (result for `a(.*)#`) | | `x+?` | Same as above: `x+` (greedy), `x+?` (non-greedy) | 1. `bc+?`
2. `<.+?>` | 1. abcd abccccd ab
2. <span>Hallo</span> html. | 1. a**bc**d a**bc**cccd ab
2. **<span>**Hallo**</span>** html. | 1. a**bc**d a**bcccc**d ab (result for `bc+`)
2. **<span>Hallo</span>** html. (result for `<.+>`) | Character Sets, Ranges, Subgroups and Lookarounds