Hello there,
I am trying to assign a certain part of an email to a String variable (lets call str1).
Here is one example of the email (email1_ss):
Despite the email screenshot above UiPath sees the email like below:
"
Dear MyTool+ Team,\r\n\r\nplease find enclosed the data sheets and quotations for the following special device/devices.\r\n\r\nDevice/Devices*:\r\n\r\n-* A7B91503737306\r\n\r\nUsed in:\r\n- Swg. No.:
"
Normally I try to get and assign “A7B91503737306” part to a String variable (str1).
I use the below method to doit:
str1 = String2.Split(" "c)(0).ToString
But the it turns out that the str1 is “A7B91503737306\r\n\r\nUsed” not “A7B91503737306”
I think there is no space between the last character of “A7B91503737306” and “Used”
There is this site regex101.com
which also us to make expressions and extract the required keyword based on expression
here is how it looks
So it will look for the starting alphabets and starts extracting the word , \d+ means digit which comes after