I was wondering why the result of my regular expression wasn't going to the case I wanted to go through.

```
var r = "This is a test.";
var ex = /a/g;
var l = ex.exec(r);

alert(l);

switch (l)
{
    case "a":
      alert("good");
      break;

    default:
      alert("error");
}

```

If you run this, you can see that "l" does in fact does equal "a" which then should trigger the case function. If anyone knows why it isn't, please help. Thank you