Can you guys help me figure this out? I have the following JavaScript snippet:
pattern = new RegExp('^bla*a', 'i');
console.debug(pattern.exec('blatr'));
After I run this, the output is ["bla"]. The way I interpret this regular expression is this: find me a string that starts with 'bla' and ends with 'a', with as many characters in between. In this case, 'blatr' shouldn't match the regular expression but it does. What am I doing wrong?
Thanks.