How to find all values after a specific word

I want to get the values of all these
but i manage to get the first three after then the same words repeated but with different values so i dont know how to get all values

this comes from a pdf? as image pdf? are you using ocr? can you share what you did so far?

yes from a pdf not an image pdf
m not using ocr
m extracting data after using activity read full pdf

@SHAF_MAIRAJ, can you give an example of the output you want to have?

like File# m replacing it with a ~ and by splitting it with ~
and so other values and saving the value of each in different variables
so i want to repeat this process if bot finds the word File# again

@Fer this is what i want

@SHAF_MAIRAJ, so your output will be like: 12345, 4567, 8127361 and 2222?

exactly
and the bot should find the other ones also if the words repeatCapture1

as u see in the message box the words are repeating and the values are different so i want to get the values and save them in a different variable and to repeat this process

You can use a get text to extract the information and place it into a string variable (str_Information), for instance,
File# 12345
Acc.no# 32234
Penalty# 87435

And then, create an array of string type arr_Information and assign it to str_Information.Split({"File#,“Acc.no#”,StringSplitOptions.None}

And then use str_Information = arr_Information(1)

Let me know if it solved

1 Like

If you already managed to get all text in a variable, then you can use Matches activity to get all you need, since what you want is numbers, your expression can be simple.

1 Like

i cannot use get text

But you can do the other part. It will split the information based on the first occurence of File# and Acc.no#

1 Like

can u make the workflow please

image

1 Like

@SHAF_MAIRAJ This Regex Should work Fine to Extract Only File# Numbers :
(?<=File#)\d*

1 Like

Can u suggest me where to learn this Regex method , i dont understand the equation u have written

Hi
We can try and execute with our Regex here in this website for more understanding

Cheers @SHAF_MAIRAJ

1 Like

Thanks bro
but look as in the screenshot these three file# acc.no# and penalty can come more than 1 time in a single pdf page and i want the bot to extract these values and save them in different variables like if_condition or loop it, when bot sees another file# after extracting the first one, i cant use get text activity because pdf contains 2500+ pages in which there can be 6 or 7 or 9 blocks of these three words with different values
so i really need a solution
personally what i did is i replaced the file# , acc.no and penalty with ~ this sign and then by splitting them i get the value but how to jump to other file#
its so complicated i couldnt describe it completely
hope u got the basic of what i want
help me bro