diff --git a/07_String_Processing.md b/07_String_Processing.md index e53f342..6527931 100644 --- a/07_String_Processing.md +++ b/07_String_Processing.md @@ -1040,7 +1040,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(.*?)#` (includes a capturing group) | 1) abcd abccccd
2) abc#defgh#i | 1) a**b**cd a**b**ccccd
2) **abc#**defgh#i | 1) a**bc**d a**bcccc**d (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
2) abc#defgh#i | 1) a**b**cd a**b**ccccd
2) **abc#**defgh#i | 1) a**bc**d a**bcccc**d (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
2) <span>Hallo</span> html. | 1) a**bc**d a**bc**cccd
2) **<span>**Hallo**</span>** html. | 1) a**bc**d a**bcccc**d (result for `bc+`)
2) **<span>Hallo</span>** html. (result for `<.+>`) | Character Sets, Ranges, Subgroups and Lookarounds