RegExpFilter QML Type | Qt 6.12
Description: Filters data in a SortFilterProxyModel by matching a role value against a regular expression.
Keywords: qmltype

- Qt 6.12
- QML Types
- RegExpFilter
- Qt 6.12.0 Reference Documentation

# RegExpFilter QML Type

Filters data in a SortFilterProxyModel by matching a role value against a regular expression. More...

Import Statement: | `import QtQml.Models`
Since: | Qt 6.12
Inherits: | RoleFilter
Status: | Technology preview

This type is in technology preview and is subject to change.

- List of all members, including inherited members

## Properties

- regExp : regexp

## Detailed Description

RegExpFilter allows filtering model data using regular expression matching on a specified role.

A JavaScript regular expression literal can be assigned directly to regExp:

     SortFilterProxyModel {
         sourceModel: processModel
         filters: RegExpFilter {
             roleName: "userId"
             regExp: /root/i
         }
     }

## Property Documentation

### regExp : regexp

This property holds the regular expression used to filter the data. A JavaScript regular expression literal can be assigned directly.

When the regExp has an empty pattern, the filter is inactive and all rows pass through.