From 9acaf669efc77947e55e7522920d6a2ee21d7cbc Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 20:42:42 +0100 Subject: [PATCH 1/5] 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) From 8382e0b33df96aafc392b6d9ad8488e724117268 Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 20:51:10 +0100 Subject: [PATCH 2/5] formatting --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22de4db..668ebda 100644 --- a/README.md +++ b/README.md @@ -593,12 +593,12 @@ possible. We can use `?` to match in a lazy way, which means the match should be This becomes even more useful when using the global flag.
-"/(.*at)/" => The fat cat sat on the mat and another fat cat got jealous.. 
+"/(.*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. +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.. 
+"/(.*at)/" => The fat cat sat on the mat and another fat cat got jealous. [Test the regular expression](https://regex101.com/r/AyAdgJ/2) From 8c0e8e106a81025da2b50fce539f9bccae43ceb0 Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 20:54:43 +0100 Subject: [PATCH 3/5] updated regex and fixed small formatting errors --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 668ebda..a9a1a1a 100644 --- a/README.md +++ b/README.md @@ -593,15 +593,15 @@ possible. We can use `?` to match in a lazy way, which means the match should be This becomes even more useful when using the global flag.
-"/(.*at)/" => The fat cat sat on the mat and another fat cat got jealous.. 
+"/(fa.*?at)/g" => 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.
+"/(fa.*at)/g" => The fat cat sat on the mat and another fat cat got jealous. -[Test the regular expression](https://regex101.com/r/AyAdgJ/2) +[Test the regular expression](https://regex101.com/r/hxE4kq/1) ## Contribution From c69cce0f113e7d0baa08b871faf7ee32293a8dcc Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 20:56:50 +0100 Subject: [PATCH 4/5] fixed wrong highlighting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9a1a1a..cae309a 100644 --- a/README.md +++ b/README.md @@ -593,7 +593,7 @@ possible. We can use `?` to match in a lazy way, which means the match should be This becomes even more useful when using the global flag.
-"/(fa.*?at)/g" => The fat cat sat on the mat and another fat cat got jealous.. 
+"/(fa.*?at)/g" => 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. From abfc1dd5f1afbeac01367bed760f7c0ab9ab4ec7 Mon Sep 17 00:00:00 2001 From: Julian von Gebhardi Date: Sun, 15 Jan 2023 21:04:31 +0100 Subject: [PATCH 5/5] fixed accidently changing a link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cae309a..b1d4599 100644 --- a/README.md +++ b/README.md @@ -588,7 +588,7 @@ 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) +[Test the regular expression](https://regex101.com/r/AyAdgJ/2) This becomes even more useful when using the global flag.