From b7510ac45576497a3a17706fb42ba78d106bc6e9 Mon Sep 17 00:00:00 2001 From: kolapsys Date: Thu, 24 Oct 2019 15:28:41 +0300 Subject: [PATCH] Update 'Anchors' in regexp basic cheatsheets --- regexp.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/regexp.md b/regexp.md index 183a73188..5089c4abc 100644 --- a/regexp.md +++ b/regexp.md @@ -5,13 +5,12 @@ layout: 2017/sheet weight: -1 authors: - github: rizqyhi -updated: 2019-03-24 + - github: kolapsys +updated: 2019-10-24 description: | Basic cheatsheets for regular expression --- -## - {: .-three-column} ### Character classes @@ -31,10 +30,18 @@ description: | ### Anchors -| Pattern | Description | -| ------- | ---------------- | -| `^abc` | Start with `abc` | -| `abc$` | End with `abc` | +| Pattern | Description | +| ------- | ----------------------- | +| `\G` | Start of match | +| `^` | Start of string | +| `$` | End of string | +| `\A` | Start of string | +| `\Z` | End of string | +| `\z` | Absolute end of string | +| `\b` | A word boundry | +| `\B` | Non-word boundry | +| `^abc` | Start with `abc` | +| `abc$` | End with `abc` | ### Escaped characters