Tag:Global matching pattern

  • Regular expression global matching pattern (g modifier)

    Time:2019-8-30

    Regular expression g modifier: The g modifier term specifies that regular expressions perform global matching, that is, they continue to search after finding the first match. Grammatical structure: Constructor mode: new RegExp(“regexp”,”g”) Object Direct Quantity Method: /regexp/g Browser support: IE browser supports this metacharacter.Firefox supports this metacharacter.Google Browser supports this metacharacter. Example code: Example 1: […]