Showing content from https://github.com/VerbalExpressions/QtVerbalExpressions below:
GitHub - VerbalExpressions/QtVerbalExpressions
Skip to content Navigation Menu
Search code, repositories, users, issues, pull requests...
Saved searches Use saved searches to filter your results more quickly
Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert VerbalExpressions/QtVerbalExpressions
Qt Regular Expressions made easy
This Qt lib is based off of the C++ VerbalExpressions library by whackashoe.
Testing if we have a valid URL
auto expression = QVerbalExpressions()
.searchOneLine()
.startOfLine()
.then("http")
.maybe("s")
.then("://")
.maybe("www.")
.anythingBut(" ")
.endOfLine();
qDebug()
<< expression // ^(?:http)(?:s)?(?:://)(?:www.)?(?:[^ ]*)$
<< expression.test("https://www.google.com"); // true
##API
- .anything()
- .anythingBut(const QString& value)
- .something()
- .somethingBut(const QString& value)
- .endOfLine()
- .find(const QString& value)
- .maybe(const QString& value)
- .startOfLine()
- .then(const QString& value)
Special characters and groups
- .any(const QString& value)
- .anyOf(const QString& value)
- .br()
- .lineBreak()
- .range(const std::initializer_list& args)
- .tab()
- .word()
- .withAnyCase()
- .searchOneLine()
- .searchGlobal()
- .replace(const QString& source, const QString& value)
- .test()
- .add(expression)
- .multiple(const QString& value)
- .alt()
About
No description, website, or topics provided.
Resources License Stars Watchers Forks
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4