29 #include <hboost/xpressive/basic_regex.hpp>
35 template <
typename T>
class UT_Array;
61 initFromGlob(pattern);
69 initFromGlob(pattern,
true,
true);
74 bool init(
const char *expr,
bool case_sensitive =
true);
79 bool initFromGlob(
const char *
pattern,
80 bool case_sensitive=
true,
81 bool is_bundle_glob=
false);
97 static bool convertGlobToExpr(
100 bool is_bundle_glob =
false);
104 bool isValid()
const;
110 bool match(
const char *
string)
const;
113 {
return match(str.
c_str()); }
124 bool match(
const char *
string,
131 bool search(
const char *
string,
137 bool search(
const char *
string,
144 bool search(
const char *
string,
145 UT_Array<std::pair<exint, exint>> &indicies,
167 exint maxsplits = 0)
const;
171 exint maxsplits = 0)
const;
182 bool replace_all =
false,
183 bool copy_on_fail =
true
191 exint num_replacements,
192 bool copy_on_fail =
true
196 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
**But if you need a result
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)
auto search(const T &set, const V &val) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
A search function.
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