Home

Awesome

Qt Pods

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

Terms

Special characters and groups

Modifiers

Functions

Other