How to trim the string in that sentence Material ID 365 created

Main.xaml (792.8 KB)

Hi friends,
Anyone help me to solve this error

material 365 id created
but I need only 365

@Abubakkar

str = “material 365 id created”

str.Tostring.split(" ".TocharArray)(1) - it will give you 365 only.

1 Like

yeah I changed but again it seems like this.

@Abubakkar,

Why you are using startIndex method here.

Store output of Get Text activity in a string variable and say it ‘Str’.

Then split it like this: Str.Tostring.Split(" ".TocharArray)(1) - It will display 346 here.

Paste the output of Get Text activity here.

1 Like

sorry bro the 346 is randomly created
it may be 240,350, something …

@Abubakkar,

Here, you attached the screenshot na. In this case, it will display 346 here but not all cases.

The above expression will give you output in between “Material” and “Created”.

Have you tried above expression or not ?

1 Like

Please check my condition

and final updated workflow Main.xaml (695.6 KB)

Hi @Abubakkar,

Use an assign statement and the output is string

Regex.replace(“material 365 id created”,“[^0-9]”,“”)

So the above expression will only give numbers, because I have given condition whichever is not integer replace with empty.

1 Like

Yeah finally it’s running good.
Thank you very much @lakshman @anil5:sunglasses:
:station: Happy weekend .

1 Like

@Abubakkar,

Can you close the topic

i dont understand which means @anil5

Mark the post as solution whomever helped you

image

1 Like

Main.xaml (1.4 MB)

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