How to get substring for a text

Dear all,

Good morning,

I am trying to get certain text from a PDF.

For example, i would like to get the invoice date.

The results are 27/02/20 19

Q1. How can i get the text without the spacing? (27/02/2019)

For example, i would like to get the invoice amount.
The text i am able to read is MYR 987.66

Q2. How can i get the text without the MYR. (only need 987.66)

Kindly advise.

Thank you.

Best regards,

Hong

1 Like

Hi @eelin

There are numerous ways you can do this.

One of the easiest way is to use replace.

invoiceDate.Replace(" “,”")
invoiceAmount.Replace(“MYR “,””)

Thanks,
KJ

1 Like

Hi @eelin

Is that always the format of the string that you get ?

You can use this as your reference.

https://rpageek.com/uipath-string-manipulation/

1 Like

@kunalj

Thanks for your reply.

Now i am able to get the text without the spacing.

But i dont understand the logic behind this.

Could you explain how this actually work?

@Gene

Thank you.

I have go through it but i really don’t have any idea what is it.

Anyway thanks a lot for sharing those information with me.

I am the beginner to Uipath and don’t have any programming knowledge.

1 Like

Basically in the first case the data is a bit corrupt and in 2nd instance you want a subset of it.

So the replace function replaces the " "(space) with “”(space removed) and similarly replaces MYR.

The best way to explore and understand uipath and its functionality is to complete level 1 rpa developer training(Available free on uipath academy). It will give you the basic understanding and you don’t need to be a programmer to learn that.

Cheers,
KJ.

1 Like

Hi @eelin
In using substring just remember the format String.Substring(Index where you can get the starting value,Length how many characters you need to get)

if you have any question you can easily pm me or share your issue here in our community and alot of good developer will address your issue.

cheers :smiley:

Happy learning :smiley:

3 Likes

@kunalj

Thanks for your explanation.

I am currently undergo the training in Uipath platform.

Thank you.

2 Likes

@eelin
Welcome :smiley:

1 Like