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

Class common_regex

subprojects/llama.cpp/common/regex-partial.h:42–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40};
41
42class common_regex {
43 std::string pattern;
44 std::regex rx;
45 std::regex rx_reversed_partial;
46
47 public:
48 explicit common_regex(const std::string & pattern);
49
50 common_regex_match search(const std::string & input, size_t pos, bool as_match = false) const;
51
52 const std::string & str() const { return pattern; }
53};
54
55// For testing only (pretty print of failures).
56std::string regex_to_reversed_partial_regex(const std::string & pattern);

Callers 1

test_regexFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_regexFunction · 0.68