---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/cohorts/cel/escaping-special-characters#article
headline: Escaping special characters
description: Learn how to reference trait group and field names that contain special characters in Twilio Cohorts filter criteria.
url: https://www.twilio.com/docs/cohorts/cel/escaping-special-characters
inLanguage: en
dateModified: 2026-09-15T09:58:28.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Escaping special characters

## Why you need to escape characters

CEL identifiers can't include periods, dashes, or double underscores, and they can't start with a digit. If a trait group or field name in your connected store's schema contains any of these characters or starts with a digit, you must escape the name before using it in filter criteria.

## Escape sequences

| Character                | Escape sequence   | Original    | Escaped                  |
| ------------------------ | ----------------- | ----------- | ------------------------ |
| `.` (dot)                | `__dot__`         | `my.field`  | `my__dot__field`         |
| `-` (dash)               | `__dash__`        | `my-field`  | `my__dash__field`        |
| `__` (double underscore) | `__underscores__` | `my__field` | `my__underscores__field` |
| Leading digit            | Prefix with `_`   | `1stChoice` | `_1stChoice`             |

## Example

The trait group `user-info` contains the field `email.primary`. To reference this field in a filter, write:

```txt
profile.trait.user__dash__info.email__dot__primary == "test@example.com"
```

## Next steps

* Return to the [filter criteria overview](/docs/cohorts/cel/overview).
* Review how [null handling](/docs/cohorts/cel/null-handling) works for missing traits.
