# Regex

Regex pattern are represented as unquoted strings, in the format of `r/my regex pattern/`.

Regex patterns can be used with the like `=~` and not like `!~` comparators.

## Limitations

1. Usage is limited to pattern matching for now. Value extraction will come in the future.
2. Patterns must start with `r/` and end with `/`.

## Examples

### Filter for strings starting with `b`

```
["foo", "bar", "baz"].filter($this =~ r/^b/)
[
    "bar",
    "baz"
]

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daseldocs.tomwright.me/syntax/regex.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
