Javascript RegEx Not Working

I have the following javascript code:

function checkLegalYear() {
var val = “02/2010″;

if (val != ”) {
var regEx = new RegExp(“^(0[1-9]|1[0-2])/\d{4}$”, “g”);