How to Check if a String Matches a RegEx in JavaScript

How to Check if a String Matches a RegEx in JavaScript