regex bug fix, additional tests