update regex and fix tests