---
updatedAt: 2026-01-24T01:52:39.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# OPAL case-sensitive filtering with match_regex

OPAL filters are case-insensitive by default. Case-sensitive filtering is used when the [`filter`](https://docs.observeinc.com/docs/verb-filter#/) verb is combined with the [`match_regex`](https://docs.observeinc.com/docs/function-match_regex#/) function.

Given the following string:

```Text OPAL
log: 2024-04-06T12:49:00Z,eventName=GetPolicy
```

The following example uses the [`filter`](https://docs.observeinc.com/docs/verb-filter#/) verb's support for OPAL functions to call [`match_regex`](https://docs.observeinc.com/docs/function-match_regex#/), which can use the case insensitivity regular expression flag:

<OpalCodeBlock
  code={
`filter match_regex(eventName,/GetPolicy/) //matches
filter match_regex(eventName,/getpolicy/) //does not match
filter match_regex(eventName,/getpolicy/i) //matches
`}
/>