Update
This commit is contained in:
parent
b1f6998983
commit
8ba58ae822
2 changed files with 31 additions and 1 deletions
2
regex.md
2
regex.md
|
@ -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>|</code>*e2*| *e1* or *e2* | escape in basic |<code>ab|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 | |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue