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

IsMatch

Frends Task for checking if a string matches a certain Regex pattern.

Task version: 2.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

InputText : String

Text to be examined.

Default: - Example: Example text.

RegularExpression : String

Regular expression pattern.

Default: - Example: abc*

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 match failed

Task Result

Name
Description

Success : Boolean

Indicates whether the task completed successfully. Example: true

IsMatch : Boolean

IsMatch result. Example: true

Data : String

Matching values. Example: {foobar}

Error : Error

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

Task Changelog

Changelog for Task Frends.Regex.IsMatch.

Changelog

[2.0.0] - 2026-07-23

Changed

  • Task now targets .NET 8.

  • Added Options parameter with ThrowErrorOnFailure and ErrorMessageOnFailure settings, allowing errors to be returned as a result instead of thrown as exceptions.

  • Added CancellationToken parameter so the task can be cancelled by Frends.

  • Result now includes a Success flag and an Error object with details when the task fails.

[1.1.0] - 2023-10-12

Added

  • Result.Data: Matching values as a string.

[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?