update regexp
This commit is contained in:
parent
1e927dccfc
commit
8769155f5e
12
regexp.md
12
regexp.md
|
@ -5,13 +5,12 @@ layout: 2017/sheet
|
||||||
weight: -1
|
weight: -1
|
||||||
authors:
|
authors:
|
||||||
- github: rizqyhi
|
- github: rizqyhi
|
||||||
|
- github: izzergh
|
||||||
updated: 2019-03-24
|
updated: 2019-03-24
|
||||||
description: |
|
description: |
|
||||||
Basic cheatsheets for regular expression
|
Basic cheatsheets for regular expression
|
||||||
---
|
---
|
||||||
|
|
||||||
##
|
|
||||||
|
|
||||||
{: .-three-column}
|
{: .-three-column}
|
||||||
|
|
||||||
### Character classes
|
### Character classes
|
||||||
|
@ -63,3 +62,12 @@ description: |
|
||||||
| `a{3,}` | Match 3 or more |
|
| `a{3,}` | Match 3 or more |
|
||||||
| `a{1,3}` | Match between 1 and 3 |
|
| `a{1,3}` | Match between 1 and 3 |
|
||||||
|
|
||||||
|
### Lookahead & Lookbehind
|
||||||
|
|
||||||
|
| Pattern | Description |
|
||||||
|
| --- | --- |
|
||||||
|
| `a(?=b)` | Match `a` in `baby` but not in `bay` |
|
||||||
|
| `a(?!b)` | Match `a` in `Stan` but not in `Stab` |
|
||||||
|
| --- | --- |
|
||||||
|
| `(?<=a)b` | Match `b` in `crabs` but not in `cribs` |
|
||||||
|
| `(?<!a)b` | Match `b` in `fib` but not in `fab` |
|
||||||
|
|
Loading…
Reference in New Issue