Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

regexPolicy

import { regexPolicy } from "https://gitlab.com/soapbox-pub/strfry-policies/-/raw/develop/mod.ts";

Reject events whose content matches the regex.

@example
// Ban events matching a regex.
regexPolicy(msg, /(🟠|🔥|😳)ChtaGPT/i);
const regexPolicy: Policy<RegExp>;