Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
8 August 2024
Regular expressions is a very powerful tool to parse strings and validate user input. Qt has support for regular expressions via the class QRegularExpression and its helpers.
Links:
* Qt Widgets and More episode on Clang Tidy and Clazy: https://youtu.be/gO3KCzdmcrQ?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
* Episode telling about validating input https://youtu.be/cY9pV-gWBeU?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o
* Mastering Regular Expressions (Third Edition) by Jeffrey E. F. Friedl, ISBN 0-596-52812-4;
* Regular expressions supported: https://pcre.org/original/doc/html/pcrepattern.html
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets
0:00 Introduction
1:29 QRegularExpression class
3:15 Code example & discussion
5:55 QRegularExpression pattern
7:25 Tips and tricks
11:48 QRegularExpression capture
15:46 KDAB Platforms Services
16:09 QRegularExpressionMatchIterator
17:51 Conclusion
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
All 'Introduction to Qt Widgets - Module 2' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6j_c41CFMprvg9EiWz0WdSy
All 'Introduction to Qt Widgets - Module 3' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hWZO_viEf1rfjgk4E6SCKd
All 'Introduction to Qt Widgets - Module 4' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6iXUNQMb2GkEjV_oK6Xid9-
All 'Introduction to Qt Widgets - Module 5' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6h1tsLAETdrrFlsVMeYpiHI