Doxygen
|
Namespace for the regular expression functions. More...
Classes | |
class | Ex |
Class representing a regular expression. More... | |
class | Iterator |
Iterator class to iterator through matches. More... | |
class | Match |
Object representing the matching results. More... | |
class | PToken |
Class representing a token in the compiled regular expression token stream. More... | |
class | SubMatch |
Object representing the match results of a capture range. More... | |
Functions | |
static bool | isspace (char c) |
static bool | isalpha (char c) |
static bool | isdigit (char c) |
static bool | isalnum (char c) |
static std::string | wildcard2regex (std::string_view pattern) |
bool | search (std::string_view str, Match &match, const Ex &re, size_t pos=0) |
Search in a given string str starting at position pos for a match against regular expression re. | |
bool | search (std::string_view str, const Ex &re, size_t pos=0) |
Search in a given string str starting at position pos for a match against regular expression re. | |
bool | match (std::string_view str, Match &match, const Ex &re) |
Matches a given string str for a match against regular expression re. | |
bool | match (std::string_view str, const Ex &re) |
Matches a given string str for a match against regular expression re. | |
std::string | replace (std::string_view str, const Ex &re, std::string_view replacement) |
Searching in a given input string for parts that match regular expression re and replaces those parts by string replacement. | |
Namespace for the regular expression functions.
|
inlinestatic |
Definition at line 48 of file regex.cpp.
References isalpha(), and isdigit().
Referenced by reg::Ex::Private::matchAt().
|
inlinestatic |
Definition at line 38 of file regex.cpp.
Referenced by isalnum(), and reg::Ex::Private::matchAt().
|
inlinestatic |
Definition at line 43 of file regex.cpp.
Referenced by isalnum(), and reg::Ex::Private::matchAt().
|
inlinestatic |
Definition at line 33 of file regex.cpp.
Referenced by reg::Ex::Private::matchAt().
bool reg::match | ( | std::string_view | str, |
const Ex & | re ) |
Matches a given string str for a match against regular expression re.
Returns true iff a match was found for the whole string.
Definition at line 764 of file regex.cpp.
References reg::Ex::match(), and match().
Matches a given string str for a match against regular expression re.
Returns true iff a match was found for the whole string. Any capture groups are returned via the match object.
Definition at line 759 of file regex.cpp.
References reg::Ex::match(), and match().
Referenced by dateTimeFromString(), endBrief(), genericPatternMatch(), getFilterFromList(), DocParser::handleStyleArgument(), VhdlDocGen::isNumber(), reg::Ex::match(), match(), match(), replace(), search(), search(), and setOutput().
std::string reg::replace | ( | std::string_view | str, |
const Ex & | re, | ||
std::string_view | replacement ) |
Searching in a given input string for parts that match regular expression re and replaces those parts by string replacement.
Definition at line 770 of file regex.cpp.
References reg::Ex::match(), and match().
Referenced by VhdlDocGen::addBaseClass(), VHDLOutlineParser::checkInlineCode(), FlowChart::printNode(), and replaceAnonymousScopes().
bool reg::search | ( | std::string_view | str, |
const Ex & | re, | ||
size_t | pos = 0 ) |
Search in a given string str starting at position pos for a match against regular expression re.
Returns true iff a match was found. Details of what part of the string has matched is returned via the match object.
An example to show how to match all identifiers in a string.
produces:
Definition at line 748 of file regex.cpp.
References reg::Ex::match(), and match().
Referenced by HtmlHelpIndex::addItem(), addValidAliasToMap(), addVariableToFile(), VHDLOutlineParser::checkInlineCode(), containsEnvVar(), MemberDefImpl::displayDefinition(), expandAliasRec(), Markdown::Private::extractTitleId(), findFunctionPtr(), findIndex(), MemberDefImpl::getClassDefOfAnonymousType(), FormulaManager::initFromRepository(), insertDimension(), isVarWithConstructor(), loadExtensions(), loadStylesheet(), matchExcludedSymbols(), MarkdownOutlineParser::parseInput(), runQHelpGenerator(), StyleData::setStyle(), simplifyTypeForTable(), splitKnRArg(), StyleData::StyleData(), DotAttributes::updateValue(), MemberDefImpl::writeDeclaration(), and MemberDefImpl::writeDocumentation().
|
static |
Definition at line 649 of file regex.cpp.