diff --git a/regexp.md b/regexp.md index 183a73188..79f6883fd 100644 --- a/regexp.md +++ b/regexp.md @@ -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` | +| `(?