serialize/deserialize for Regex
Merge pull request #5788 from amitmurthy/amitm/regex

serialize/deserialize for Regex