This commit is contained in:
Miloslav Ciz 2023-11-07 21:39:59 +01:00
parent b1f6998983
commit 8ba58ae822
2 changed files with 31 additions and 1 deletions

View file

@ -30,7 +30,7 @@ There exist different standards and de-facto standards for regular expressions,
|`[`*A*`-`*B*`]`| like `[` `]` but specifies a range | everywhere | `[3-5]` matches `3`, `4` and `5` |
| `[^`*S*`]` | matches any char. NOT from set *S* | everywhere | `[^abc]` matches `d`, `e`, `A`, `1` etc. |
|`{`*M*`,`*N*`}`| *M* to *N* repetitions of *expr* |escape (`\{`, `\}`) in basic| `a{2,4}` matches `aa`, `aaa`, `aaaa` |
|*exp1*`|`*exp2*| *exp1* or *exp2* | escape (`\|`) in basic | `abc|def` matches `abc` or `def` |
|*e1*<code>&#124;</code>*e2*| *e1* or *e2* | escape in basic |<code>ab&#124;cd</code> match. `ab` or `cd`|
| `\`*n* |backref., *n*th matched group (starts with 1)| extended only | `(..).*\1` matches e.g. `ABcdefAB` |
|`[:alpha:]` | alphabetic, *a* to *z*, *A* to *Z* | Posix (GNU has `[[` `]]` | `[:alpha:]*` matches e.g. `abcDEF` |
|`[:alnum:]` | | same as above | |