> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/relate/segments/segments-filtering-by-area-code-or-region.md).

# Segments - Filtering by area code or region

Use advanced filters to segment your lead base strategically, organizing it by area code or region.

## Creating a segment for the São Paulo region

After creating and naming the segment responsible for grouping the leads, go to the 'Filters' tab and use the condition 'The lead field value...' to check whether the Whatsapp field meets the following [regular expression](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Guide/Regular_expressions):&#x20;

```regex
55(11|12|13|14|15|16|17|18|19)\d{8,9}
```

This expression groups all leads whose number starts with `55`, followed by a valid area code from the state of São Paulo (from `11` to `19`). The area codes are separated by the character `|`, which functions as an operator **OR**.

Leads that meet this criterion will be automatically added to this segment.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FhbWQR7HtZZeWl4OGwTVl%2Fimage.png?alt=media&amp;token=15d59823-65dc-4a7a-b7ad-4f919aa3b368" alt=""><figcaption><p><em>Segment 'Filters' tab.</em></p></figcaption></figure>
