mirror of
https://github.com/ziishaned/learn-regex.git
synced 2025-08-06 11:36:47 -04:00
Fix a grammar typo (#88)
Also added a small addition to clarify regex's default behavior without the g flag.
This commit is contained in:
parent
2a787a27e9
commit
a3a7b3ac3c
@ -498,7 +498,7 @@ The `g` modifier is used to perform a global match (find all matches rather than
|
||||
stopping after the first match). For example, the regular expression`/.(at)/g`
|
||||
means: any character except new line, followed by lowercase character `a`,
|
||||
followed by lowercase character `t`. Because we provided `g` flag at the end of
|
||||
the regular expression now it will find every matches from whole input string.
|
||||
the regular expression now it will find all matches in the input string, not just the first one (which is the default behavior).
|
||||
|
||||
<pre>
|
||||
"/.(at)/" => The <a href="#learn-regex"><strong>fat</strong></a> cat sat on the mat.
|
||||
|
Loading…
x
Reference in New Issue
Block a user