QRegularExpression の例

QRegularExpression の例では、Qt の正規表現がどのようにテキストに適用されるかを、新しい正規表現を作成し、カスタムのテキスト文字列でテストできる環境を提供することによって示しています。

この例では、Qt 5.0 で導入されたQRegularExpression クラスを使用しています。QRegularExpression は Perl 互換の正規表現を実装しており、大文字小文字を区別しないマッチング、複数行マッチング、Unicode プロパティセレクタ、部分マッチング/インクリメンタルマッチングなど、多くの高度なマッチング機能をサポートしています。

サンプルプロジェクト @ code.qt.io

© 2025 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.