# extract_cypher

> **Function** in `langchain_aws`

📖 [View in docs](https://reference.langchain.com/python/langchain-aws/chains/graph_qa/neptune_cypher/extract_cypher)

Extract Cypher code from text using Regex.

## Signature

```python
extract_cypher(
    text: str,
) -> str
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain-aws/blob/ea22fe3d744a3248b0b74ed555e9c34844b35a54/libs/aws/langchain_aws/chains/graph_qa/neptune_cypher.py#L53)