Tostring and regex