> Source: [sk184633](https://support.checkpoint.com/results/sk/sk184633)

# sk184633 - Pattern Data Type fails to match inline regular expression flag (?i)

| Property | Value |
|----------|-------|
| Solution ID | sk184633 |
| Date Created | 2026-02-10 |
| Last Modified | 2026-02-22 |
| Technical Level | Advanced |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20, R81.10 (EOS) |

## Symptoms

- A Pattern Data Type was configured with a regular expression containing the inline flag `(?i)`, but it matches only some of the filenames.  


For example:

The regex `(?i).*\.jpg` is expected to match anything that contains `.jpg`, but when downloading files, we received different results:   


* Match for `image.jpg`
* No match for `example.jpg`
* Match for `certificate.jpg`
* No match for `screenshot.jpg`

<br />

## Cause

The REM regex parser does not support the inline regex flag `(?i)`. When it encounters `(?i)`, it incorrectly tokenizes it as:  
? `( = `grouping operator  
? `? =` zero-or-one quantifier  
? `i =` literal character 'i'  
? `) =` close group  

This causes the pattern to be interpreted as: "match either nothing or the letter `i`, followed by any characters, and ending with `.jpg`". Therefore, filenames containing `i` match (*image.jpg*, *certificate.jpg*) but files without `i` are not matched (*example.jpg*, *screenshot.jpg*).

## Solution

This solution requires authentication. Please log in to view the full solution.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
