Yah Correct
Cheers @caduque
Hi @Adrian_Star
I moved your post to the #news:faq section, it’s great!
I suppose it could only use some better formatting, currently I think you simply copy pasted the text from other source and it looks a bit awkward
Hey, I’m putting graphics for a better understanding of the subject.
Moved to first entry.
Does anyone know how to remove the symbol " in a text? I tried
str_paymentpartner.Replace(“”“,”")
but doesn’t seems to work
You can use logic:
output = System.Text.RegularExpressions.Regex.Replace(your_String, "[^\w\.@-]","")
or
output = System.Text.RegularExpressions.Regex.Replace(yourString, "[^\w\.@-]"," ")
Or read this post:
Replace (regex) problems
Thank you!
bravo and I hope this gets added to some of the official documentation/ reference in academy. bump for visibility
Amazing! This is as if good for documentation in UiPath. I wish the UiPath Academy would also add some in-depth tutorials like this one for addressing specific functionalities in their courses. Great job @Adrian_Star!
Você esta de Parabéns!!!
This is amazing! Thank you so much for this.
Thank you very much man. You definitely simplified everything.
Thank you for your efforts, its quite helpful.
Hi @Adrian,
How can we remove a blank line after our text? I’ve tried with “Trim” but without success.
My text is:
Client ID: PU23971
Client Name: Chance Strittmatter
Client Country: Germany
And I want the string “PU23971-Chance Strittmatter-Germany”
I’m using those methods:
ClientID = Trim(Split((Split(ClientInformation,"Client ID: ")(1).ToString),"Client Name: ")(0)).ToString
ClientName= Trim(Split((Split(ClientInformation,"Client Name: ")(1).ToString),"Client Country: “)(0)).ToString
ClientCountry = Trim(ClientInformation.Split(”:"c)(3))
Type into: ClientID + “-” + ClientName + “-” + ClientCountry
But I’m having this:
Hi @Airun, You can try:
textString.Replace(vbCr, "").Replace(vbLf, "")
Remove New Line from whole string:
Replace(vbCr, "")
- removes \r
[CR (Carriage Return)]
Replace(vbLf, "")
- removes \n
[LF (Line Feed, Environment.NewLine)]
Replace(vbCrLf, "")
- removes \r\n
[CR+LF ( End Of Line)]
Remove New Line only from the end of string:
textString.TrimEnd(vbCr.ToCharArray)
textString.TrimEnd(vbCrLf.ToCharArray)
textString.TrimEnd(vbCrLf.ToCharArray)
Perfect!!! Thank you very much!!!
Hello,
In this video I do a lot of stuff with String:
0:35 Examples for Substring functions
4:10 IndexOf and LastIndexOf
5:00 SubString working together IndexOf and LastIndexOf
6:45 Split string by character
8:50 Split string by string
12:00 Lower Case and Upper Case
12:45 Trim
15:05 Compare strings in multiple ways
19:05 Resume of all the String function part
Thanks,
Cristian Negulescu
thank you for the wonderful gifts
how can I use substring in order to check keywords in the first 100 characters of email body. I tried to use it as - item.Body.Substring(0,100).Contains(“stop”)
however, I am getting an error for it.
HI, apparently your Body email is not always 100 characters long. You can first measure the length of a string with?:
item.Body.Lenght
(as Int 32 variable), and then substitute a variable containing the length of characters under the limit substring.
if lenght >= 100
then
item.Body.Substring(0,100).ToLower.Contains("stop")
else
item.Body.Substring(0,len).ToLower.Contains("stop")
Something like this:
The simpler solution I see is to put assign with item.Body.Substring (0,100) .Contains (“stop”) in try catch. in catch you just give something like: item.Body.Contains (“stop”) just without substring.
Something like this: