Class RegexExtractDsl

Assembly: redb.Route.Llm.Tools.dll

DSL extension that wires a regex-extraction step into a route. Reads
{"text":"...","pattern":"...","group":"name|number","all":bool}
from exchange.In.Body, runs the pattern under
(default 1 s — guards
against catastrophic backtracking) and writes the result to
exchange.Out.Body as JSON: a string, an array of strings, or
null when nothing matched.

From("direct:llm.regex_extract")
.AsLlmTool("regex_extract").Description("Extract text by a .NET regex.").Then()
.RegexExtract(new RegexExtractOptions());

public static class RegexExtractDsl

Inheritance

Object→RegexExtractDsl

Methods

RegexExtract(IRouteDefinition, RegexExtractOptions?)

Adds a regex extraction step. Uses default options when options is null.

public static IRouteDefinition RegexExtract(this IRouteDefinition self, RegexExtractOptions? options = null)