178
rated 0 times
[
184]
[
6]
/ answers: 1 / hits: 71563
/ 13 Years ago, sat, august 13, 2011, 12:00:00
I have the following snippet. I want to find the appearance of a
, but it does not work. How can I put the variable right?
var string1 = 'asdgghjajakhakhdsadsafdgawerwweadf';
var string2 = 'a';
string1.match('/' + string2 + '/g').length;
More From » regex