diff --git a/README.md b/README.md index ffd6e9c..63c5e65 100644 --- a/README.md +++ b/README.md @@ -367,6 +367,30 @@ character and the matcher must be end of the string. [Test the regular expression](https://regex101.com/r/t0AkOd/1) +### 2.8.3 Word Boundary + +`\b` Matches, without consuming any characters, immediately between a character matched by \w and a character not matched by \w (in either order). It cannot be used to separate non words from words.. For example, regular expression `\bfat\b` means: a +lowercase character `f`, followed by lowercase character `a`, followed by a `t` character and the matcher must be a word on the string. + +
+"\bfat\b" => The fat cat. sat. on the mat with the fatty cat.
+
+ +[Test the regular expression](https://regex101.com/r/y4Au4D/8) + +
+"\bfat" => The fat cat. sat. on the mat with the fatty cat.
+
+ +[Test the regular expression](https://regex101.com/r/OXYjxn/1) + + +
+"fat\b" => The fat cat. sat. on the mat with the fatty cat.
+
+ +[Test the regular expression](https://regex101.com/r/nAOq0x/1) + ## 3. Shorthand Character Sets Regular expression provides shorthands for the commonly used character sets,