Javascript examples for RegExp:RegExp Match
Three Char Month and Culture matching using regex
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*ww w . java 2 s. c o m*/ var shouldMatch = "may"; var regexPattern = /^Jan$|^Feb$|^Mar$|^Apr$|^May$|^Jun$|^Jul$|^Aug$|^Sep$|^Oct$|^Nov$|^Dec$/i; if(regexPattern.test(shouldMatch)) { console.log(shouldMatch); } } </script> </head> <body> </body> </html>