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)