QRegularExpression 示例

QRegularExpression 示例通过提供一个环境,展示如何在Qt中将正则表达式应用于文本,用户可以在该环境中创建新的正则表达式,并针对自定义文本字符串进行测试。

该示例使用了在 Qt 5.0 中引入的QRegularExpression 类。QRegularExpression 实现了与 Perl 兼容的正则表达式,支持多种高级匹配功能,例如不区分大小写的匹配、多行匹配、Unicode 属性选择器以及部分/增量匹配。

一款用于测试正则表达式的、包含多种字段的应用程序

示例项目 @ code.qt.io

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.