IsMatch
Frends Task for checking if a string matches a certain Regex pattern.
Last updated
Was this helpful?
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
InputText : String
Text to be examined.
Default: -
Example: Example text.
RegularExpression : String
Regular expression pattern.
Default: -
Example: abc*
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
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
Changelog for Task Frends.Regex.IsMatch.
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.
Result.Data: Matching values as a string.
Targeting changed to only include .NET 6.0 (removed .NET Standard 2.0)
Initial implementation
Last updated
Was this helpful?
Was this helpful?

