fixed regex 

Javascript halted on regex null value
Merge pull request #1 from peterruiter/master

fixed regex