Vorlage:RX
Erscheinungsbild
ϵ
typografisch formatierte reguläre Ausdrücke
| ⧼templatedata-doc-param-name⧽ | ⧼templatedata-doc-param-desc⧽ | ⧼templatedata-doc-param-type⧽ | ⧼templatedata-doc-param-status⧽ | |
|---|---|---|---|---|
| Basis | base1 | “x” | ⧼templatedata-doc-param-type-string/line⧽ | ⧼templatedata-doc-param-status-suggested⧽ |
| Minimum | min2 | 0 falls weggelassen | ⧼templatedata-doc-param-type-number⧽ | ⧼templatedata-doc-param-status-optional⧽ |
| Maximum | max3 | unendlich falls weggelassen | ⧼templatedata-doc-param-type-number⧽ | ⧼templatedata-doc-param-status-optional⧽ |
</templatedata>}}
Test und Demo
| Parameter | — | 0 | 1 | 2 | 3 | n |
|---|---|---|---|---|---|---|
| — | x | x? | x–2 | x–3 | x–n | |
| 0 | x∗ | x? | x0–2 | x0–3 | x0–n | |
| 1 | x+ | ?x | x! | xx? | x1–3 | x1–n |
| 2 | x2–∞ | x? | x2 | x2x? | x2–n | |
| 3 | x3–∞ | x? | x3–2 | x3 | x3–n | |
| n | xn–∞ | x? | xn–2 | xn–3 | xn |
| Code | Ergebnis | Erwartung |
|---|---|---|
| {{RX}} | ϵ | ϵ |
| {{RX|x}} | x | x |
| {{RX|x|0}} | x∗ | x* |
| {{RX|x|1}} | x+ | x+ |
| {{RX|x|2}} | x2–∞ | x{2,} |
| {{RX|x|n}} | xn–∞ | x{n,} |
| {{RX|x|0|0}} | ||
| {{RX|x|0|1}} | x? | x? |
| {{RX|x|0|2}} | x0–2 | x{0,2} |
| {{RX|x|0|n}} | x0–n | x{0,n} |
| {{RX|x|1|0}} | ?x | error |
| {{RX|x|1|1}} | x! | x! |
| {{RX|x|1|2}} | xx? | xx? / x{1,2} |
| {{RX|x|1|n}} | x1–n | x{1,n} |
| {{RX|x||0}} | ||
| {{RX|x||1}} | x? | x? |
| {{RX|x||2}} | x–2 | x{,2} |
| {{RX|x||n}} | x–n | x{,n} |
| {{RX|x|2|2}} | x2 | x{2} |
| {{RX|x|2|3}} | x2x? | x{2}x? |
| {{RX|x|2|4}} | x2–4 | x{2,4} |