---
title: Begins with & Ends with
slug: segment/begins-with-and-ends-with
docTags: 
createdAt: 2026-01-15T00:47:27.902Z
---

:::hint{type="info"}
These filter types are available for *Text, EmailAddress, Phone,&#x20;*&#x61;nd *Locale&#x20;*&#x66;ield types.
:::

## *Begins with&#x20;*&#x66;ilter type

The *Begins with&#x20;*&#x66;ilter checks if a field starts with the specified characters or substring (i.e. *Does this value start with \_\_\_?*). This is especially helpful when:

- Filter records by prefix-based naming (e.g., all campaigns starting with *Q3\_* or *TEST\_*)
- Identify emails starting with a company prefix (e.g., *internal\_*)
- Match SKUs or codes that follow a consistent pattern (e.g., *PRD001*,*&#x20;PRD002*, etc.)

### Example

You’re working with a list of campaign names like:

- *PROMO\_Summer*
- *PROMO\_Q2*
- *TXN\_Invoice*
- *TXN\_Shipping*

If you apply:

- **Filter:** *Begins With*
- **Value:** *PROMO*

**Result:**

- PROMO\_Summer ✅
- PROMO\_Q2 ✅
- TXN\_Invoice ❌

![](https://support.deselect.com/hc/article_attachments/34588029231249)

## *Ends with&#x20;*&#x66;ilter type

The *Ends with&#x20;*&#x66;ilter checks if a field finishes with the specified characters or substring (i.e. *Does this value end with \_\_\_?*). This is especially helpful when:

- Match email addresses by domain (e.g., Ends With "gmail.com")
- Find file names or URLs ending in certain formats (e.g., .pdf, .jpg)
- Identify customer codes or reference numbers ending in specific digits or tags

### Example

- Working with email addresses\:Apply:**Result:**
  - jane.doe\@gmail.com
  - john\@company.com
  - alex\@yahoo.co.uk
  - **Filter:** Ends With
  - **Value:** gmail.com
  - jane.doe\@gmail.com ✅
  - john\@company.com ❌
  - alex\@yahoo.co.uk ❌

![](https://support.deselect.com/hc/article_attachments/34588029232401)

## Wildcard behavior

Both filter types allow you to manually use the same SQL wildcards: % (for zero or more characters) and \_ (for exactly one character). You can **combine** **them** for flexible matching (e.g., %\_@company.com matches emails where the second-to-last character before @ is a wildcard).

Unaric Segment automatically applies the % wildcard differently for each filter:

- **Begins with:** The platform automatically adds the % wildcard to the **end** of your input to match any characters that follow it.
- **Ends with:** The platform automatically adds the % wildcard to the **beginning** of your input to match any characters that precede it.

### Examples

- `PROMO%` matches *PROMO\_Summer, PROMO\_Q2*.
- `PROMO_` matches *PROMO\_Q, PROMO\_X,* etc.
- `TXN_%%%%` matches values like *TXN\_Invoice, TXN\_Shipping*.

