I use this code to search and count vowels in the string,
a = \"run forest, run\"; a = a.split(\" \"); var syl = 0; for (var i = 0; i < a.length - 1; i++) {
The simplest way is
s.match(/[aeiou]/gi).length