| 1077 | } |
| 1078 | |
| 1079 | static Status DoRegex(const std::string& segment, std::smatch* matches) { |
| 1080 | static std::regex re( |
| 1081 | "^" |
| 1082 | "([\\[\\(])" // open bracket or paren |
| 1083 | "([^ ]+)" // representation of range minimum |
| 1084 | " " |
| 1085 | "([^ ]+)" // representation of range maximum |
| 1086 | "([\\]\\)])" // close bracket or paren |
| 1087 | "$"); |
| 1088 | |
| 1089 | if (!std::regex_match(segment, *matches, re) || matches->size() != 5) { |
| 1090 | return Status::Invalid("regex failed to parse"); |
| 1091 | } |
| 1092 | |
| 1093 | return Status::OK(); |
| 1094 | } |
| 1095 | |
| 1096 | Result<PartitionPathFormat> Format(const compute::Expression&) const override { |
| 1097 | return PartitionPathFormat{"", ""}; |