Removing @ character while using Get text activity

Hi,

I recently encountered a problem while using Get text activity from website, the value will be assigned to string variable as below ( in 2 lines)

@“This is the sample
string text for testing”

I tried using replace, remove, trim methods but its not working

Can anyone please help on how can we remove @ in the beginning and also how can we bring it to in one line

Thanks in advance

Hi,

How did you check it? If in Locals panel, it’s C# syntax and we can ignore it because the @sign is not content of the variable.

Regards,

@M1288


 Remove the "@" symbol
textValue = textValue.TrimStart("@"c)

 Bring the text to one line
textValue = textValue.Replace(vbCrLf, " ")

or

yourStringVariable = yourStringVariable.Replace("@", "").Replace(Environment.NewLine, " ").Trim()

or

yourStringVariable = System.Text.RegularExpressions.Regex.Replace(Input,"@","").Replace(Environment.NewLine, " ").Trim()

Hi @M1288

I think you are copying the text from the locals panel. In the locals panel you get the way as in below image
image

to get the whole string in one line you can use below syntax:

originalText= "This Is the sample
String text For testing"
cleanedText= originalText.ReplaceLineEndings(" ")

Regards

hey @M1288

try this:
processedString = inputString.Trim().Replace("@", "").Replace(vbCrLf, " ").Replace(vbCr, " ").Replace(vbLf, " ")

Hi @M1288

Please check the below thread

Regards

Hi @M1288

Please check the below thread:

Regards

That @ isn’t actually in the data, it’s just the way it displays during debugging.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.