JavaScript RegExp - g



Description

g performs a global match that is, find all matches rather than stopping after the first match.

Example

Following example shows usage of RegExp expression.


   
      JavaScript RegExp
   
   
   
      
   

Output

Test 1 - returned value : abc,abc,abc
Test 2 - returned value : abc
Advertisements