I've got the following regex which looks for a match of abc inside def:
var abc = 'foo',
def = '123456789qwertyuifoobar23rghfj';
if( def.match('/' + abc + '/i') ){
console.log('DONE!');
} else {
console.log('ERROR!');
}
But it isn't returning true. Why? What am I doing wrong?