MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / consume_regex

Method consume_regex

subprojects/llama.cpp/common/chat-parser.cpp:460–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460common_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
467std::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_);

Callers 6

test_regexFunction · 0.80
parse_json_tool_callsFunction · 0.80

Calls 2

strMethod · 0.45

Tested by 2

test_regexFunction · 0.64