# Callables.with\_name\_regex()

`with_name_regex(`*`regex: str`*`) →` [`Callables`](https://glide.gitbook.io/main/glider-ide/api/callables)

Adds a filter to get callables whose names match the given regex expression. Returns a filtered [Callables](https://glide.gitbook.io/main/glider-ide/api/callables) child object. This method can be called on all [Callables](https://glide.gitbook.io/main/glider-ide/api/callables) child classes: [Functions](https://glide.gitbook.io/main/glider-ide/api/functions) and [Modifiers](https://glide.gitbook.io/main/glider-ide/api/modifiers).

To filter given a list of regex expression, refer to [Callables.with\_name\_regexes()](https://glide.gitbook.io/main/glider-ide/api/callables/callables.with_name_regexes).

### Functions Example

```python
from glider import *

def query():
  # Retrieve the functions that have `claim` in their name but do not start with `_`
  functions = Functions().with_name_regex(r"^(?!_).*claim.*$").exec(100)

  # Return the first five functions
  return functions[:1]
```

Output:

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FQc0qU6Ye6YYrW4Kmk7Kj%2Fimage.png?alt=media&#x26;token=408286df-dfa7-4334-8d44-189cb6295a2d" alt=""><figcaption></figcaption></figure>

### Modifiers Example

```python
from glider import *

def query():
  # Retrieve the modifiers that have `claim` in their name but do not start with `only`
  modifiers = Modifiers().with_name_regex(r"^(?!only).*claim.*$").exec(100)

  # Return the first five modifiers
  return modifiers[:3]
```

Output:

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2F7KWn6PdyD0F8I4Xq28Ik%2Fimage.png?alt=media&#x26;token=855e1369-d9ab-497f-8064-60266be4087d" alt=""><figcaption></figcaption></figure>
