28: mParentPattern(parent), mText(text)
39 if (std::regex_search(mText, mParentPattern->
mPattern))
47 return match(mFrom, ENDANCHOR);
54 ss << std::regex_replace(mText, mParentPattern->
mPattern, replacement);
61 int nextSearchIndex = mLast;
62 if (nextSearchIndex == mFirst)
66 if (nextSearchIndex < mFrom)
67 nextSearchIndex = mFrom;
70 if (nextSearchIndex > mTo) {
76 return search(nextSearchIndex);
83 if (start < 0 || start > limit)
93 if (group < 0 || group > (
int)mGroups.size())
96 return mGroups[
group];
106 mSubs = mText.substr(from, mText.length() - from);
108 if (std::regex_search(mSubs, mGroups, mParentPattern->
mPattern))
116 return static_cast<int>(mText.length());
125 for (
int i = 0; i < (int)mGroups.size(); i++)
127 for (
int i = 0; i < (int)mLocals.size(); i++)
130 mLastAppendPosition = 0;
bool match(const int from, const int anchor) const
bool search(const int from)
std::string replaceAll(const std::string &replacement) const
Matcher(const Pattern *parent, const std::string &text)
int getTextLength() const
const std::string group() const
const std::regex mPattern