QtVerbalExpressions - This Qt lib is based off of the C++ VerbalExpressions library. [MIT]

Overview

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

  • .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()

Modifiers

  • .withAnyCase()
  • .searchOneLine()
  • .searchGlobal()

Functions

  • .replace(const QString& source, const QString& value)
  • .test()

Other

  • .add(expression)
  • .multiple(const QString& value)
  • .alt()
You might also like...
If the button pressed esp will reset and App mode will on. App mode will on then led will on, network is connected led will off.

DHT22-to-Google-sheet-Reset-Using-ESP8266-LED-Switch If button pressed esp will reset and App mode will on. App mode will on then led will on, network

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas.
Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas.

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas. With a theoretical transmission range of 10 miles (16kms), OTG messenger can be used by groups of people to stay connected when they are in areas not serviced by mobile connectivity.

Living off the Land Attack in Linux, load an anonymous file in memory.
Living off the Land Attack in Linux, load an anonymous file in memory.

ELFMemoryLoader Living off the Land Attack in Linux。 Linux场景下的核心载荷不落地攻击。 Loader get elf data from remote server, then use file descriptor to run elf i

To turn on and off the pump, most people use a manual switch.
To turn on and off the pump, most people use a manual switch.

To turn on and off the pump, most people use a manual switch. As a result, people forget to switch off the pump from time to time, resulting in water overflow. They may forget to switch on the motor at times, resulting in a water problem later on. It also wastes a lot of electricity. To solve this problem, we need a smart device to control the pump.

Spin-off component from existing IBM/mcas open source project

PyMM PyMM is a python library that allows the storing and manipulation of existing heavily used types such as Numpy ndarray and PyTorch on Persistent

A plug which auto turns off when it's Shabbos or Yom Tov.
A plug which auto turns off when it's Shabbos or Yom Tov.

Melacha Plug A Melacha aware plug which turns off when it's Shabbos or Yom Tov. This project is using ESPHome. Looking to disable a smart doorbell for

Small and dirty header-only library that supports user input with some more advanced features than in the standard lib.

dirty-term Small and dirty header-only library that supports user input with some more advanced features than in the standard lib. This small, lightwe

ZSV/lib: a fast CSV parsing library and standalone utility
ZSV/lib: a fast CSV parsing library and standalone utility

Please note: this code is still alpha / pre-production. Everything here should be considered preliminary. If you like ZSVlib, please give it a star! Z

Lib 2d - A c++ library for paths defined by points within the 2d space

#lib_2d A c++ library for anything related to points within the 2d space (using floating point data types) using Catch as testing framework https://gi

Comments
  • Package to be used with qt-pods

    Package to be used with qt-pods

    How cool is that? I would really miss it if it weren't packaged to be used with qt-pods. See here for reference: https://github.com/cybercatalyst/qt-pods

    opened by jacob3141 5
  • Fix author in readme

    Fix author in readme

    Hi!

    I actually wrote CppVerbalExpressions, not ionutvmi. He just created the repo as I don't have repo creation ability (only collaborator in verbalexpressions group). You can verify this in the git history. Feel somewhat odd making this pull request, but figured it technically is a documentation bug hehe.

    Thanks for making good use of it!

    opened by whackashoe 0
  • Had to replace % with + operator in string additions

    Had to replace % with + operator in string additions

    In the source file, the percent sign is used for string addition (I don't know why). I had to replace it with + so that the code compiles (Qt 5.7.0, Microsoft Visual Studio 2013). Then it worked nicely.

    opened by CsatiZoltan 0
Owner
null
An IoT based project using Wi-Fi Module and MIT App Inventor with intuitive control

Phone Controlled (joystick) Robot Car Project An IoT based project using Wi-Fi Module and MIT App Inventor with intuitive control. A 4 wheeler robot c

Sukritee Sharma 2 Nov 3, 2022
A C program game that James and I made for a course based off of Oregon Trail

ENGG1340 Course Project 2020/2021 Team members (Alphabetical Order) James & Collin Game description It is the modern era of the 21st Century and Chris

Collin 1 Nov 18, 2022
A Tester for the Libft 42 project based off Tripouille

libfttester A Tester for the Libft 42 project This Tester was made by NotJustJoe, using Tripouille Leaks checker and kind of inspired off his work (ht

trofidal 7 May 20, 2022
Monitor based on perf_event: split-lock, irq-off, profile, task-state, watchdog, kmemleak, kvm-exit, mpdelay

基于perf的监控框架 基于libperf和libtraceevent库实现简单的监控框架,提供比perf更灵活的特性。 数据不落盘。 数据过滤,基于tracepoint的过滤机制,减少数据量。 数据实时处理并输出。不需要存盘后再处理。 基于perf_event_open系统调用。 虽然比perf更

null 23 Dec 20, 2022
Based off of [tarekwiz / League-Unpacker]

val-exception-handler Attempted conversion of [tarekwiz / League-Unpacker (https://github.com/tarekwiz/League-Unpacker/blob/master/Unpackman/Main.cpp)

null 15 Oct 9, 2022
Let's upgrade cheap off-the-shelf robotic mowers to modern, smart RTK GPS based lawn mowing robots!

OpenMower Join the Discord server for OpenMower discussion: HERE About the Project ⚠️ DISCLAIMER: IF YOU ARE NOT 100% SURE WHAT YOU ARE DOING, PLEASE

Clemens Elflein 3.4k Jan 4, 2023
Port of MIT's xv6 OS to the Nezha RISC-V board with Allwinner D1 SoC

xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is impl

Michael Engel 62 Dec 12, 2022
Hörmann Garage Door Opener mit ESP8266 (direkt über Bus, ohne UAP1 !)

hgdo Hörmann Garage Door Opener für Supramatic E3 und P3 Die Hörmann-Antriebe der Supramatic-3-Serie lassen sich über die Universaladapterplatine UAP1

null 23 Nov 25, 2022
ON AIR or OFF AIR Monitor with WFH

wfh_monitor_m5 M5 Stack ON AIR or OFF AIR Monitor with WFH Dependency Arduino IDE==1.8.13 Blynk==1.0.0 Setup Hardware M5 Stack Smartphone(Android or i

karaage 4 Feb 26, 2022