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.