From 27f36ce1975a3ef73bc7703e90aeb0a00c993ca5 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Sun, 8 Mar 2026 17:24:01 -0500 Subject: [PATCH] add documentation for filter.regex --- astro.config.mjs | 5 +++++ src/content/docs/processors/filter/filter.md | 18 ++++++++++++++++++ src/content/docs/processors/string/filter.md | 18 ------------------ 3 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 src/content/docs/processors/filter/filter.md delete mode 100644 src/content/docs/processors/string/filter.md diff --git a/astro.config.mjs b/astro.config.mjs index 1411dfa..c0abc68 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -70,6 +70,11 @@ export default defineConfig({ collapsed: true, autogenerate: { directory: 'processors/router' } }, + { + label: "Filter", + collapsed: true, + autogenerate: { directory: 'processors/filter' } + }, { label: "Int", collapsed: true, diff --git a/src/content/docs/processors/filter/filter.md b/src/content/docs/processors/filter/filter.md new file mode 100644 index 0000000..792607e --- /dev/null +++ b/src/content/docs/processors/filter/filter.md @@ -0,0 +1,18 @@ +--- +title: Regex Filter +sidebar: + order: 1 +--- +The `filter.regex` processor matches incoming string payload against a regular expression. If there is a match then the payload is sent through. This processor will return an error if the message being processed is not a string. + +- **type**: `filter.regex` +- **params**: + - **pattern**: regex pattern to match against the incoming string + +### Example +Match strings starting with `hello` +``` +- type: filter.regex + params: + pattern: "^hello.*" +``` \ No newline at end of file diff --git a/src/content/docs/processors/string/filter.md b/src/content/docs/processors/string/filter.md deleted file mode 100644 index 83d7737..0000000 --- a/src/content/docs/processors/string/filter.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: String Filter -sidebar: - order: 4 ---- -The `string.filter` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string. - -- **type**: `string.filter` -- **params**: - - **pattern**: regex pattern to match against the incoming string - -### Example -Match strings starting with `hello` -``` -- type: string.filter - params: - pattern: "^hello.*" -``` \ No newline at end of file