The Google Ads Query Language lets you filter the returned dataset with several different
operators. When you filter on string values, the case sensitivity of each
operator determines how your results are matched.

> [!NOTE]
> **Note:** In Google Ads Query Language, clause keywords (such as `SELECT`, `FROM`, and `WHERE`) are case insensitive, though uppercase is recommended by convention. Resource and field names (such as `campaign.id` in `snake_case`) and enum literals (such as `ENABLED` and `PAUSED` in `UPPER_SNAKE_CASE`) are case sensitive.

## Operator case sensitivity

| Operator | Case sensitivity |
|---|---|
| `=` or `!=` | Case sensitive |
| `IN` or `NOT IN` | Case sensitive |
| `LIKE` or `NOT LIKE` | Case insensitive |
| `CONTAINS ALL`, `CONTAINS ANY`, `CONTAINS NONE` | Case sensitive |
| `REGEXP_MATCH` or `NOT REGEXP_MATCH` | Case sensitive by default (configurable) |

> [!IMPORTANT]
> **Key Point:** `REGEXP_MATCH` and `NOT REGEXP_MATCH` use the RE2 regular expression engine and are case sensitive by default. Add the `(?i)` option to the regular expression to make the search case insensitive (including Unicode character case folding, though accented characters remain distinct from unaccented characters).

## Examples

The following examples illustrate how different operators handle string casing
in Google Ads Query Language.

### Case-insensitive regular expression

The following query uses `(?i)` to match campaign names containing `"test"`,
`"Test"`, `"TEST"`, or any other casing variation:

    SELECT
      campaign.id,
      campaign.name
    FROM campaign
    WHERE campaign.name REGEXP_MATCH "(?i).*test.*"

> [!CAUTION]
> **Caution:** Using leading wildcards (such as `.*test`) in regular expressions can slow down query execution on large accounts. Use exact operators or prefix matches where possible.

### Exact and pattern matching

- **Case-sensitive exact match:** `WHERE campaign.name = 'Search Campaign'` matches only the exact casing.
- **Case-insensitive pattern match:** `WHERE campaign.name LIKE '%search campaign%'` matches `'SEARCH CAMPAIGN'`, `'search campaign'`, or `'Search Campaign'`.