Search page for int of specific length

Hi all,

Question, I have a robot that needs to look at a webpage and find an number that’s 23 digits long. It doesn’t have specific number it starts with. I thought the robot could search for anything that’s 23 characters long by using the ? sign, but how do I search for only numbers, so I am sure the robot is not picking up any words that are 23 characters long.

Thanks in advance!

Hi @AnniekJ,

You can try with var reg = /[1]{1,23}$/; regex to check the string contains only numbers or not with 23 digits length.

And to get data from the webpage you can use Web Data Extraction with particular pattern.


  1. 0-9 ↩︎

I’m not sure how you mean this, you would put this in a assign or a decision or …?
If possible, could you send me an example?

@sarathi125

       Scrap data from the web page and store in one variable assume v1

       use assign activity v1 = Regex.Match (v1,"\d+").value           
       
       Now v1 as ony numbers

Note: To use Regex.Match first you needs to import System.Text.RegularExpressions in the variable panel

Check this workflow,

Main.xaml (9.9 KB)

Aah, I didn’t know about the matches activity. Great, thanks a lot! :slight_smile: