> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/callables/callables.with_name_regex.md).

# Callables.with\_name\_regex()

`with_name_regex(`*`regex: str`*`) →` [`Callables`](/glider-ide/api/callables.md)

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

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

### 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="/files/uDnifZpXryVwAfiRkkUO" 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="/files/PXQ7mD2FGQ9EsdSDLQtv" alt=""><figcaption></figcaption></figure>
