fixed bug with regex; Closes #1