naveen.s
(Naveen S)
February 6, 2024, 8:45am
1
Hi All,
Hope all are doing good.
I want to fetch only the email address from the below string:
Please use the following address to contact me john.doe@localcompany.com on the company email.
the string is dynamic and I dont wanna use the regex to achieve this.
Please do the needful.
thanks
pikorpa
(Piotr Kołakowski)
February 6, 2024, 8:48am
2
Hey @naveen.s
try to use:
emailAddress = inputString.Split(" "c).Where(Function(s) s.Contains("@") AndAlso s.Contains(".")).FirstOrDefault()
Yoichi
(Yoichi)
February 6, 2024, 8:49am
3
Hi,
Can you try to use FindMatchingPattern activity as the following.
There is email pattern and FirstMatch property returns first match string.
Regards,
vrdabberu
(Varunraj Dabberu)
February 6, 2024, 8:50am
4
naveen.s:
Hope all are doing good.
I want to fetch only the email address from the below string:
Please use the following address to contact me john.doe@localcompany.com on the company email.
the string is dynamic and I dont wanna use the regex to achieve this.
Please do the needful.
thanks
Hi @naveen.s
inputString.Split(" "c).Where(Function(x) x.Contains("@")).FirstOrDefault()
Regards
lrtetala
(Lakshman Reddy)
February 6, 2024, 8:50am
5
naveen.s:
I want to fetch only the email address from the below string:
Please use the following address to contact me john.doe@localcompany.com on the company email.
the string is dynamic and I dont wanna use the regex to achieve this.
Please do the needful.
Hi @naveen.s
Try this
Input="Please use the following address to contact me john.doe@localcompany.com on the company email."
Input.Split(" "c)(Array.FindIndex(Input.Split(" "c), Function(x) x.Contains("@")))
Cheers!!
Hi @naveen.s
Try below Regex Expression:
System.Text.RegularExpressions.Regex.Match(InputString," [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}").Value
Hope it will helps you
Cheers!!
system
(system)
Closed
February 9, 2024, 9:02am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.