Click or drag to resize
TextHelperBulkReplace Method
Performs bulk replace of given replacements

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 9.0.0
Syntax
C#
public static string BulkReplace(
	string text,
	string[,] replacements,
	bool encode = false,
	bool useRegEx = true,
	bool escapeRegExSubstitutions = true
)

Parameters

text
Type: SystemString
Text to process
replacements
Type: SystemString
Key-Value pairs of replacements
encode (Optional)
Type: SystemBoolean
If true, replacements are encoded
useRegEx (Optional)
Type: SystemBoolean
If true, regular expressions are used to perform the replace
escapeRegExSubstitutions (Optional)
Type: SystemBoolean
If true, regex special characters are escaped so the replacement value is the value of the result, not the regular expression of replace.

Return Value

Type: String
See Also