| 458 | } |
| 459 | |
| 460 | common_chat_msg_parser::find_regex_result common_chat_msg_parser::consume_regex(const common_regex & regex) { |
| 461 | if (auto result = try_consume_regex(regex)) { |
| 462 | return *result; |
| 463 | } |
| 464 | throw common_chat_msg_partial_exception(regex.str()); |
| 465 | } |
| 466 | |
| 467 | std::optional<common_chat_msg_parser::find_regex_result> common_chat_msg_parser::try_consume_regex(const common_regex & regex) { |
| 468 | auto m = regex.search(input_, pos_); |