in reply to A regular expression (or regex)
i know what does the "g" and "i" means, as below.
Apparently not. Not only does if (/.../g) make no sense, it's practically always a bug. (if (/.../gc) might be seen in some advanced code.)