regular expression params:
- g - global matching
- m - multiline
- i - case-insensitive matching
var reg_exp = /pattern/gmi;
regular expression example:
var no_letters = 'abc123XYZ'.replace(/[a-z]/gmi, ''); console.log(no_letters); // return '123'
var reg_exp = /pattern/gmi;
var no_letters = 'abc123XYZ'.replace(/[a-z]/gmi, ''); console.log(no_letters); // return '123'