For the complete documentation index, see llms.txt. This page is also available as Markdown.

Replace

Reads text and replaces substrings matching with specified regular expression.

Task version: 1.2.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

InputText : String

Text to be modified.

Default: - Example: Example text.

RegularExpression : String

Regular expression pattern.

Default: - Example: abc*

Replacement : String

Text to replace regex matches with.

Default: - Example: foo

Name
Description

ThrowErrorOnFailure : Boolean

Whether to throw an exception on failure.

When false, errors are returned in the Result object instead.

Default: True Example: true

ErrorMessageOnFailure : String

Custom error message used when ThrowErrorOnFailure is enabled or an error result is returned.

Leave empty to use the original exception message.

Default: - Example: Regex replace failed

Task Result

Name
Description

Success : Boolean

Indicates whether the task completed successfully. Example: true

ReplacedText : String

Contains Regex-replaced input. Example: Replaced text.

Error : Error

Error information, populated when Success is false. Example: null

Task Changelog

Changelog for Task Frends.Regex.Replace.

[1.2.0] - 2026-08-07

Changed

  • Added error handling support: a new Options parameter lets you control whether errors are thrown as exceptions or returned as part of the result object.

  • The task result now includes a Success flag and an Error property for more consistent error handling.

  • Updated target framework to .NET 8.

[1.1.0] - 2024-09-11

Update

  • [Breaking] Parameter structure has been changed from the version that has been released to NuGet feeds.

  • Needed to increase the version number to fix the issue with .Net8 targeted processes not finding correct namespace.

[1.0.1] - 2023-06-13

Changed

  • Documentation updates.

[1.0.1] - 2022-02-21

Changed

  • Targeting changed to only include .NET 6.0 (removed .NET Standard 2.0)

[1.0.0] - 2022-02-09

Added

  • Initial implementation

Last updated

Was this helpful?