add custom serializer for Regex