update regexp

This commit is contained in:
is 2019-10-04 21:59:58 -04:00
parent 1e927dccfc
commit 8769155f5e
1 changed files with 10 additions and 2 deletions

View File

@ -5,13 +5,12 @@ layout: 2017/sheet
weight: -1
authors:
- github: rizqyhi
- github: izzergh
updated: 2019-03-24
description: |
Basic cheatsheets for regular expression
---
##
{: .-three-column}
### Character classes
@ -63,3 +62,12 @@ description: |
| `a{3,}` | Match 3 or more |
| `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` |