Hi Community,
I have to get required string from below three variables with using regex (Need each variable for output)
Input:
Variable1: Offloading Esy OCC
Variable2: onloading Esy OCC
Variable3: M1tOC1 Onloading Testing CR Automation
Output:
Variable1 output: Offloading
Variable2 output: onloading
Variable3 output: M1tOC1
Thanks
Shaik
lrtetala
(Lakshman Reddy)
3
@shaik.muktharvalli1
Using Regex try below
System.Text.RegularExpressions.Regex.Match(inputText,"\w+(?=\s+)").Value
Regards,
2 Likes
singh_sumit
(Sumit Singh Tariyal)
4
Hie @shaik.muktharvalli1 here your regex pattern

System.Text.RegularExpressions.Regex.Match( “offloading Esy OCC”,“+”).Value
System.Text.RegularExpressions.Regex.Match( “onloading Esy OCC”,“+”).Value
System.Text.RegularExpressions.Regex.Match(“M1tOC1 Onloading Testing CR Automation”,“^\w+”).Value
output
cheers Happy Automation
1 Like
Thank you @lrtetala , @singh_sumit it’s working fine 
Thnaks
Shaik
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.