activities
latest
false
UiPath logo, featuring letters U and I in white

Workflow Activities

Last updated Dec 20, 2024

Replace

Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.

Definition

Namespace: UiPath.Activities.System.API

Assembly: UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

Overloads

  
Replace(String, String, String)Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.
Replace(String, String, String, Regex Options)Within a specified input string, replaces strings that match a regular expression pattern, and Regex options, with a specified replacement string.

Replace(String, String, String)

Within a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.

string Replace(
	string input,
	string pattern,
	string replacement
)string Replace(
	string input,
	string pattern,
	string replacement
)
input String
The string to be replaced.
pattern String
The regular expression pattern to match.
replacement String
The replacement string.

Replace(String, String, String, Regex Options)

Within a specified input string, replaces strings that match a regular expression pattern, and Regex options, with a specified replacement string.

string Replace(
	string input,
	string pattern,
	string replacement,
	RegexOptions regexOption
)string Replace(
	string input,
	string pattern,
	string replacement,
	RegexOptions regexOption
)
input String
The string to be replaced.
pattern String
The regular expression pattern to match.
replacement String
The replacement string.
regexOption RegexOptions
A bitwise combination of the enumeration values that specify options for matching. The available options are IgnoreCaseMultiline,ExplicitCapture, Compiled, Singeline, IgnorePatternWhitespace, RightToLeft, ECMAScript, and CultureInvariant.

Return value

A new string that is identical to the input string, except that a replacement string takes the place of each matched string.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.