+ 5
in this ➡"replace(/[^a-zA-Z0-9]+/g,''); "why.... '/g ' used?
explain me plz...
5 Antworten
+ 1
V-રાની 🙈🙉🙊 that is a g modifier that indicates to search the whole string rather than stopping at the first match to replace.
Here's a reference
https://www.w3schools.com/jsref/jsref_regexp_g.asp
+ 6
Thanks all...😊 your information is quite helpful ...
+ 5
global search flag
+ 3
+ 2
Erase ('') all the characters (g modifier) which are not (^) belong character (+)
a to z
A to Z
0 to 9