Hi,
I need to get value in body mail like this
ex:
Dear abc,
*This is your ID of customer [value] *
Thanks
How can I get [value] . pls kindly help
Thanks
Hi,
I need to get value in body mail like this
ex:
Dear abc,
*This is your ID of customer [value] *
Thanks
How can I get [value] . pls kindly help
Thanks
Hi ,
Hi
welcome to uipath community
Once after getting mail body in a string variable named str_body
Then use this expression in a assign activity like this
str_value = System.Text.RegularExpression.Regex.Match(str_body,β(This is your ID of customer).+β).ToString.Trim
This would give us the value part alone
Hope this would help you
Cheers @LucastoH
Hi Palaniyappan,
Because text in mail body alway change so could you tell me how to catch the value i want
I suggest they write CustomerID in [ ] . Can I ?
Hi hk803592,
Thanks for help,
but it still workings because text in body include CustomerID change everytime they send to me so i canβt catch that ID.
Any idea to catch that ?
Fine in that case we can use this expression
str_value = System.Text.RegularExpression.Regex.Match(str_body,β\[(.*?)\]β).ToString.Trim
Or
If we donβt want the square brackets around
Fine in that case we can use this expression
str_value = System.Text.RegularExpression.Regex.Match(str_body,β\[(.*?)\]β).ToString.Trim.Replace(β[β,ββ).Replace(β]β,ββ)
Cheers @LucastoH
@LucastoH Use regular expression
assign str = System.Text.RegularExpression.Regex.Match(str_body,β(?<=[).*(?=])β).ToString
Refer this
Itβs working , thanks very much !!
Great
Cheers @LucastoH
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.