Can someone please help me figure out a regex code for Bot to search a text file and find a string of specific words even when they are separated by a line break?
I have extracted the text from a pdf file to text file and preserved the format. For example as per screenshot, if Bot searches for “provincial and international borders” it’s not finding a match because of the line break after “and”. I’ve preserved the pdf format because bot shouldnt search the French text in right column.
Input: pls see screenshot
Expected output: “provincial and international borders”
Bot is required to search through the text to determine if it contains a pre-defined string stored in a dynamic variable (usually 3-4 words phrase), which could be found across several pages in the file.
First, read Pdf file as text using Read PDF Text with PreserveForamtting option.
Then, remove French part. French part always starts from 74th character in each line.
Next, remove line number: 5,10,15,20,25,30 using Regex.Replace
Finally extract target phrase using the above regex.