1337
parent
61be98239a
commit
d8639390da
|
@ -5,11 +5,11 @@ Read [Syntax](https://github.com/google/re2/wiki/Syntax).
|
||||||
Read [Golang-Regex-Tutorial](https://github.com/StefanSchroeder/Golang-Regex-Tutorial).
|
Read [Golang-Regex-Tutorial](https://github.com/StefanSchroeder/Golang-Regex-Tutorial).
|
||||||
|
|
||||||
| regex | meaning |
|
| regex | meaning |
|
||||||
| ------- | ----------------------------------------- |
|
| -------- | ----------------------------------------- |
|
||||||
| `.` | any character, default not including `\n` |
|
| `.` | any character, default not including `\n` |
|
||||||
| `[xy]` | `x` or `y` character |
|
| `[xy]` | `x` or `y` character |
|
||||||
| `[^xy]` | not `x` and `y` character |
|
| `[^xy]` | not `x` and `y` character |
|
||||||
| \| | `x` or `y` |
|
| `x`\|`y` | `x` or `y` |
|
||||||
| `x*` | 0 or more `x`, prefer **more** |
|
| `x*` | 0 or more `x`, prefer **more** |
|
||||||
| `x+` | 1 or more `x`, prefer **more** |
|
| `x+` | 1 or more `x`, prefer **more** |
|
||||||
| `x?` | 0 or 1 `x` , prefer 1 |
|
| `x?` | 0 or 1 `x` , prefer 1 |
|
||||||
|
@ -26,7 +26,7 @@ Read [Golang-Regex-Tutorial](https://github.com/StefanSchroeder/Golang-Regex-Tut
|
||||||
| -------------- | ----------------------------------- |
|
| -------------- | ----------------------------------- |
|
||||||
| `(foo)` | numbered capturing group (submatch) |
|
| `(foo)` | numbered capturing group (submatch) |
|
||||||
| `(?:foo)` | non capturing group |
|
| `(?:foo)` | non capturing group |
|
||||||
| `(?:x|y)` | `x` or `y` expression wrap in `()` |
|
| `(?:x`\|`y)` | `x` or `y` expression wrap in `()` |
|
||||||
| `(?flags)` | set flags within current group |
|
| `(?flags)` | set flags within current group |
|
||||||
|
|
||||||
| flag | meaning |
|
| flag | meaning |
|
||||||
|
|
Loading…
Reference in New Issue