I have a string that contains double quotes, and I’d like to remove them, replacing each instance with an empty character. I’m looking for a way to accomplish this so that the double quotes are entirely removed from the text.
So if greetingText initially contains “Welcome to the Team”, this will result in cleanedText containing Welcome to the Team, with all double quotes removed.
Fallow the steps below. If I helped you, please mark it as solved.
1 Add an Assign activity.
2 In the To box, enter the variable that stores the string (for example, greetingText).
3 In the Value box, use the Replace function to remove the quotes, as in the following example:
greetingText = greetingText.Replace(“”“”, “”)
Explanation:
The first “”" represents a single double quote. We use three quotes so that UiPath understands that we want to include a literal double quote inside the function.
The second “” represents the empty character, which is the value that will replace the quotes.
When you run this code, all " in the string will be removed, and the greetingText variable will now contain the text without the double quotes.