Class RegexReplaceTool
A built-in tool for replacing or splitting text using regex patterns.
Supports pattern-based replacement with back-references ($1, $2, ${name}) and splitting text by regex delimiters.
public sealed class RegexReplaceTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
RegexReplaceTool
- Implements
- Inherited Members
Examples
var tool = new RegexReplaceTool();
registry.Register(tool);
// Agent can now: replace patterns, split text by regex
Constructors
- RegexReplaceTool()
Initializes a new instance with default settings.
- RegexReplaceTool(RegexToolOptions)
Initializes a new instance with custom options.
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.