serialize/deserialize for Regex