Split String, add the two next character

Hi Everyone.
I have a bit of a problem with a PDF text.


I can get 10498796,92 whit the expression Text.ToString.Split(",“c)(0)+”,"+Text.ToString.Substring(Text.IndexOf(",")+1,2)

But when I try to get 10529615,78 and use Text.ToString.Split(",“c)(3)+”,"+Text.ToString.Substring(Text.IndexOf(",")+1,2)

I still get 92 as decimals.
Do anyone know how I get 78?

//Thaagaard

@Thaagaard Check below method

Text.ToString.Substring(Text.LastIndexOf(",")+1,2)

3 Likes

Thank you so much.It worked great. I thought to much. Ha ha ha.

Just to check for the future…
Do you know How I would do if I wanted to get 30818,86? The 86 in this case?

1 Like

@Thaagaard

Try this.

      str = "30818,86?"
      requiredStr = str.Split(","c)(1)

@Thaagaard Please check below.

Text.ToString.Substring(Text.LastIndexOf(",",Text.LastIndexOf(",")-1)+1,2)

1 Like

Thank you so much. This is FUN. I have been working with Nice Real-Time before. And UiPath is MUCH better and easier.

1 Like

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