From 9acaf669efc77947e55e7522920d6a2ee21d7cbc Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 20:42:42 +0100 Subject: [PATCH] update section lazy match --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 9c1c4b2..22de4db 100644 --- a/README.md +++ b/README.md @@ -588,6 +588,19 @@ possible. We can use `?` to match in a lazy way, which means the match should be "/(.*?at)/" => The fat cat sat on the mat. +[Test the regular expression](https://regex101.com/r/AyAdgJ/1) + +This becomes even more useful when using the global flag. + +
+"/(.*at)/" => The fat cat sat on the mat and another fat cat got jealous.. 
+ +Without using this the
?
to match in a lazy way it would look like this. + +
+"/(.*at)/" => The fat cat sat on the mat and another fat cat got jealous.. 
+ + [Test the regular expression](https://regex101.com/r/AyAdgJ/2)