Javascript Check String Against Regexp