# `Exonerate.Formats.Regex`
[🔗](https://github.com/E-xyza/exonerate/blob/master/lib/exonerate/formats/regex.ex#L1)

Module which provides a macro that generates special code for an json
pointer filter.

the format is governed by the ECMA-262 standard:
https://www.ecma-international.org/publications-and-standards/standards/ecma-262/

# `filter`
*macro* 

Creates a `NimbleParsec` parser `~regex/1`.

This function returns `{:ok, ...}` if the passed string is a valid regex,
or `{:error, reason, ...}` if it is not.  See `NimbleParsec` for more
information on the return tuples.

The function will only be created once per module, and it is safe to call
the macro more than once.

## Options:
- `:name` (atom): the name of the function to create.  Defaults to
  `:"~regex"`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
