How to extract text behind a particular text element

hallo everyone,

I am trying to extract a text which is next to a particular known text.
following is an example scenario:

324234 name1
345232 name2
434343 name3

in this case i know the text of ‘name1’, ‘name2’, ‘name3’ . but i do not know the numbers.
i would like to get the number before the name.

I am using ‘find OCR text’ to find the name in the field. I do not understand how to extract the number before the name text.

do you have any solution for this kind of problem ?
Thank you

best regards,

@susheel.chandra Use regular expression to extract only number

1 Like

@indra . yes that’s correct, i can use get text to extract the number. but i need to extract only the number before a particular name and the order of the names changes dynamically. do you have any other solution for this ?

use (\d.+)(?=\w{5,8}) for regex match.


@susheel.chandra Everytime number will be six digits or it changes

this will work irrespective of the length, for a particular name
regexName.xaml (6.1 KB)


@farhan94 Thank you Farhan. I am able to get the required results now.

1 Like

@Divyashreem Thank you for the information ! it helped me.

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