27 #include <hboost/xpressive/basic_regex.hpp>
56 initFromGlob(pattern);
64 initFromGlob(pattern,
true,
true);
69 bool init(
const char *expr,
bool case_sensitive =
true);
74 bool initFromGlob(
const char *
pattern,
75 bool case_sensitive=
true,
76 bool is_bundle_glob=
false);
92 static bool convertGlobToExpr(
95 bool is_bundle_glob =
false);
105 bool match(
const char *
string)
const;
108 {
return match(str.
c_str()); }
119 bool match(
const char *
string,
126 bool search(
const char *
string,
132 bool search(
const char *
string,
139 bool search(
const char *
string,
140 UT_Array<std::pair<exint, exint>> &indicies,
162 exint maxsplits = 0)
const;
166 exint maxsplits = 0)
const;
177 bool replace_all =
false,
178 bool copy_on_fail =
true
186 exint num_replacements,
187 bool copy_on_fail =
true
191 hboost::xpressive::cregex myExpr;
bool match(const UT_StringRef &str) const
std::string getErrorString(int errorNum)
Return a string (possibly empty) describing the given system error code.
static FromBundleGlobTag FromBundleGlob
static FromGlobTag FromGlob
UT_Array< UT_StringView > UT_StringViewArray
const char * c_str() const
UT_Regex(const char *expr)
A utility class to do read-only operations on a subset of an existing string.
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
UT_Regex(const char *pattern, FromBundleGlobTag)
void OIIO_UTIL_API split(string_view str, std::vector< string_view > &result, string_view sep=string_view(), int maxsplit=-1)
UT_Regex(const char *pattern, FromGlobTag)
bool match(const UT_String &str) const