> 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/contracts/contracts.with_error_regex.md).

# Contracts.with\_error\_regex()

`with_error_regex(regex: str) ->` [`Contracts`](/glider-ide/api/contracts.md)

## Query Example

```python
from glider import *

def query():
  contracts = Contracts().with_error_regex('^Err.*').exec(1)
  errors = contracts[0].errors().exec()
  for error in errors:
    print(error.signature)

  return contracts
```

## Output Example

<figure><img src="/files/PLCVPjTccvP4OBJOFBi7" alt=""><figcaption></figcaption></figure>
