Extract a number from a text

How can I extract a word that starts in a specific way from different texts
That is, I have the following text:
“post charge” "
area that requests the development of art: marketing
Art link submission date: 03 August 2020
purchase order: 4501925095
material code: 8043933
material description: pel bokitas q / b plus 2 bok rell de mani op 5195
clise quantity: 8
unit cost: 150 total cost: 1200 "
Or this other
purchase order # 4501977276 ref. : proformas 1011

From each of these texts I must obtain the number that starts at 45, this number always starts at 45 and has 10 digits, how can I do it?

Is it possible to have 2 sets of values in the same line startinf with 45 and then has 100 digits?

@Juan_Esteban_Valencia

Use regex as below

Use a Match activity and give the pattern

It will give you a collection, Use ForEach to loop through the values

Hope this helps you

Thanks

Hi @seanrockvz13
No, it is defined that the text will only find a number that begins with 45 and will have 10 digits, although if there is some way to validate that, it would be better, it would be like shielding the code

@Juan_Esteban_Valencia

Check as below

Attached workflow for your reference
Main.xaml (6.4 KB)

Hope this helps you

Thanks

2 Likes

Got it.

Please try this workflow.

I placed the set of string that you put in a notepad inside the data folder.
The bot will loop in the notepad to go to one item line by line.

Oops pls change the file path location :slight_smile:

Regex.zip (3.0 KB)

1 Like

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