Fix regex and update tests