Scraping Partial Text From Row

Hi. I would like to scrape partial text from a row on a web page, but not the entire row. For example, the row looks like this:

Account Number: 123456

I want to scrape the numbers “123456” and save them to a variable, but not the text “Account Number” or empty space before it. With Get Text I can only scrape the entire row/text. Is there any way to do this?

Thank you!

first use get text to assign text to variable e.g. txt

then assign to to accountNumber variable
System.text.regularexpressions.regex.match(txt, "([\d]+)").Groups(1).Value

this will extract number from “Account Number: 123456” into accountNumber variable

Thank you @jack.chan . While I was waiting, I actually solved this in a different way using the SPLIT function as explained here. This seems a bit easier for me as I can repeat this without much coding. But thank you (again) for a fast and accurate response!

1 Like

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