Hi, how to change text in variable to empty text? If the variable contains a given word, e.g. “black”, replace this variable with empty text.
Thank You.
1 Like
1 Like
Hi,
Can you try the following expression?
yourString = System.Text.RegularExpressions.Regex.Replace(yourString,"^[\s\S]*black[\s\S]*$","")
Regards,
1 Like
we can interpret this use case into direction
- when, within the variable value a particular token occurs
- then, set the entire variable value to empty string
assign Activity
yourStringVar = If(yourStringVar.Contains("black"), String.Empty, yourStringVar)
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.