add `regex` serialize/deserialize schema

1. add `regex` serialize/deserialize schema
2. make serialize/deserialize inplace