How to get specific values from data

I have applied OCR on PDF File and extracted text given below:
2019-01-12 this is December 243
2019-01-12 this is First day 3324
2019-01-12 this is normal 3323
2019-01-12 this is Second day 3324

I want to extract date and all integer values from this.

2 Likes

Hi
If the above string is stored in a variable named str_input
Then to get the values in each line
—use a assign activity like this
arr_lines = str_input.Split(Environment.NewLine.ToArray())

Where arr_lines is a variable of type array of string which will separate these para of text to individual lines

—now pass this array variable to FOR EACH activity and change the type argument as string
—inside the loop use a WRITELINE activity to get the date value
Split(item.ToString,” “)(0).ToString.Trim

—and another writeline activity to get the last numerical value
Split(item.ToString,” “).Last().ToString.Trim

Or

If we have the above strings in a individual line then we can pass them directly to last two expressions instead of item.ToString

Cheers @muneeb