REGEXP

Creates a regular expression match expression (REGEXP).

This infix function checks if the column's value matches the specified regular expression pattern. The REGEXP operator is a non-standard SQL feature but is supported by SQLite if the appropriate user-defined function has been registered. The behavior and syntax of the regular expression depend on the implementation of that function.

Example

// Find users with email addresses from a specific domain
// Generates: "email" REGEXP '^[A-Za-z0-9._%+-]+@example\.com$'
Users.email REGEXP "^[A-Za-z0-9._%+-]+@example\\.com$"

Note: This will only work if a regexp() SQL function is available to the database connection.

Return

An Expression representing the REGEXP condition.

Author

MOHAMMAD AZIM ANSARI

Parameters

value

The regular expression pattern to match against the column's value.

See also


infix fun <T : String?> KQLiteColumn<*>.REGEXP(value: KQLiteColumn<out T>): Clause.Expression