The use of globle in regular expression
I used the regular expression (/\<+\/+\s+/gm,"开发者_如何学Go</")
. If i remove the g the regular expression don't work. Please let me know technical difference between 'g-global and m-multiple'.
From http://www.regular-expressions.info/javascript.html
/g enables "global" matching. When using the replace() method, specify this modifier to replace all matches, rather than only the first one.
/i makes the regex match case insensitive.
/m enables "multi-line mode". In this mode, the caret and dollar match before and after newlines in the subject string.
See also http://php.net/manual/en/reference.pcre.pattern.modifiers.php
精彩评论