Check String Against Regex Tutorialspoint Javascript