---
schema_version: "1"
id: 2d7dbbafdd77e1ee343b12aa69845b67d2d21656e3afd2c85945384cd13797e4
title: REGEXP_LIKE
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/scalar-func/string-matching/regexp-like.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/regexp-like.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9c543e09bd8ccdc07f3cbbbe9d8a02391c50ee40f11ca4cfc798076f3b51e48a
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `REGEXP_LIKE`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns true if the string matches the regular expression pattern.

## Syntax

```sql
regexp_like(<string>, <pattern> [, flags])
```

## Arguments

### Required

- `<string>`: The string to match against.
- `<pattern>`: The regular expression pattern.

### Optional

- `flags`: A string of option flags that modify matching behavior. Flags can be combined (for example, `'iq'`).

## Flags

| Flag | Description                                             |
| :--- | :------------------------------------------------------ |
| `i`  | Case-insensitive matching                               |
| `c`  | Case-sensitive matching (default)                       |
| `q`  | Literal-string matching (disables regex metacharacters) |

## Returns

Returns a boolean value indicating whether the string matches the pattern.

## Considerations

- Equivalent to the `~` operator but in function form.
- Matches anywhere within the string by default. Use `^` and `$` anchors for full string matching.
- Newline-sensitivity flags (`n`, `m`, `s`, `p`, `w`) aren't supported.
- For detailed regex syntax, see [Regular Expression Syntax](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-matching.md#regular-expression-syntax).

## Examples

### Basic Match

Check whether a string matches a pattern.

```sql
SELECT regexp_like('hello world', 'world') AS result;
```

Returns `true`.

### Match Digits

Check whether a string contains digits.

```sql
SELECT regexp_like('abc123', '\d+') AS result;
```

Returns `true`.

### Full String Match

Match the entire string using anchors.

```sql
SELECT regexp_like('hello', '^hello$') AS result;
```

Returns `true`.

```sql
SELECT regexp_like('hello world', '^hello$') AS result;
```

Returns `false` because the entire string does not match.

### Case-Insensitive Matching

Use the `i` flag for case-insensitive matching.

```sql
SELECT regexp_like('HELLO WORLD', 'world', 'i') AS result;
```

Returns `true`.

### Literal Pattern with q Flag

Use the `q` flag to treat the pattern as a literal string, disabling regex metacharacters.

```sql
SELECT regexp_like('a.b', 'a.b', 'q') AS result;
```

Returns `true`, matching the literal characters `a.b` rather than "any character between a and b."

```sql
SELECT regexp_like('axb', 'a.b', 'q') AS result;
```

Returns `false`.

### Filter Rows

Use in a WHERE clause to filter data.

```sql
SELECT email FROM users
WHERE regexp_like(email, '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$');
```

Returns rows with valid email format.

## Related Documentation

- [Regular Expression Match Operators](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/regex-match.md)
- [REGEXP_SUBSTR](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/regexp-substr.md)
- [Regular Expression Syntax](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/string-matching.md#regular-expression-syntax)
