Help with Get Text

Hi, I’m new to UIPath and am trying to use Get Text to pull some info from a website.

The site is Molecular Mass Calculator - Christoph Gohlke and I want to grab the Average mass and Monoisotopic mass values.

I’ve managed to pull the full strings into an Excel spreadsheet (Average mass : 18.01529 and Monoisotopic mass: 18.01056) but I only want to pull the values rather than the words.

Can anyone explain how to do this?

HI @russ

You can try like this

  • After getting the text use that variable in split method or regex to get the value

Regex Method

Regards
Gokul

2 Likes

Hi @russ

From the full string we can get the ouput by
Split operation

Split(gettextoutvar,":")(1)

Will give result only value!

Regards

2 Likes

Split Method

  • For Average Mass
    Use this expression Split("Average mass : 18.01529 ","Average mass : ")(1)

image

  • For Monoisotopic mass
    Use this expression Split("Monoisotopic mass: 18.01056 ","Monoisotopic mass: ")(1)

image

Regards
Gokul

1 Like

Wow, thanks for the quick responses @Gokul001 and @pravin_calvin!

I’ll test these methods out and report back.

HI,
Could you please split with (:slight_smile: and take the second part.

Eg: thatstring.Split(":“C)(1)
you can also use
thatstring.Split(”:"C).Last
Thanks
Regards
Sahad KK

2 Likes

Hi @russ

If your query is resolved Kindly close this topic and mark the appropriate post as solved.

It will helps for other to

1 Like

Thank you all for the help! Everyone’s suggested fixes using Split worked. Appreciate your quick and informative answers!

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