What is the meaning of the 'g' flag in regular expressions?

前端 未结 9 700

What is the meaning of the g flag in regular expressions?

What is is the difference between /.+/g and /.+/?

9条回答
  •  抹茶落季
    2020-11-22 10:10

    G in regular expressions is a defines a global search, meaning that it would search for all the instances on all the lines.

提交回复
热议问题