Checked for null return from RegExp.exec()
Merge pull request #1 from aramk/master

Checked for null return from RegExp.exec()