Updated RegEx to be JSHint compliant, slightly modified var declaration to be a single statement.