mirror of
https://github.com/ziishaned/learn-regex.git
synced 2025-08-04 10:36:33 -04:00
Merge abfc1dd5f1afbeac01367bed760f7c0ab9ab4ec7 into 70e38b70bc434c0b05d97d1aeea0127aea8147c8
This commit is contained in:
commit
863f16354b
13
README.md
13
README.md
@ -591,6 +591,19 @@ possible. We can use `?` to match in a lazy way, which means the match should be
|
||||
|
||||
[Test the regular expression](https://regex101.com/r/AyAdgJ/2)
|
||||
|
||||
This becomes even more useful when using the global flag.
|
||||
|
||||
<pre>
|
||||
"/(fa.*?at)/g" => The <a href="#learn-regex"><strong>fat cat</strong></a> sat on the mat and another <a href="#learn-regex"><strong>fat cat</strong></a> got jealous.</pre>
|
||||
|
||||
Without using this the `?` to match in a lazy way it would look like this.
|
||||
|
||||
<pre>
|
||||
"/(fa.*at)/g" => The <a href="#learn-regex"><strong>fat cat sat on the mat and another fat cat </strong></a>got jealous.</pre>
|
||||
|
||||
|
||||
[Test the regular expression](https://regex101.com/r/hxE4kq/1)
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user