# RegexFilter

- [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RegexFilter#SCHEMA_REPRESENTATION)
- [Behavior](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RegexFilter#Behavior)

RegexFilters can be applied at the Forwarder and/or Collector level. Filters defined at both levels are merged, and the Collector's filters take precedence if there are conflicting descriptions.

| JSON representation |
|---|
| ``` { "description": string, "regexp": string, "behavior": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RegexFilter#Behavior`) } ``` |

| Fields ||
|---|---|
| `description` | `string` Describes what is being filtered and why. |
| `regexp` | `string` The regular expression used to match against each incoming line. |
| `behavior` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RegexFilter#Behavior`)`` Filter behavior to apply when a match is found. |

## Behavior

Filter Behaviors

| Enums ||
|---|---|
| `BEHAVIOR_UNSPECIFIED` | Attempting to set this default value will result in a validation error. |
| `ALLOW` | Allow the filtered line to be uploaded. |
| `BLOCK` | Block the filtered line from being uploaded. |