How can i get value after _

Hello,

I have below balue in variable and i only need last value after""
ex1 ] Team
Copernico_TempoCopernico_TempoReport_1
expected output - 1
ex2] Team_ Copernico_TempoCopernico_TempoReport_2
expected output - 2

help me on same

Use a split by “_”

You could use the following regex:

(?<=_)\d+

If this solves your issue, Do mark it as a solution
Happy Automation :star_struck:

Hi @Mathkar_kunal

Use assign
extractedValue = yourString.Split("_"c)(yourString.Split("_"c).Length - 1)

Hope this helps!

1 Like

Hello,
Please use the following regex
op=System.Text.RegularExpression.Regex.match(ex,“(?<=_)\d+”).value

Hey @Mathkar_kunal

“your output is “+strInout.Split(”_”)(3).ToString

hope this help you.

Hi @Mathkar_kunal

Can you try this

Regards,

Hi @Shireen_M

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.