Dears,
Is it possible to check the occurence of words in text extracted from “Get Visible OCR Text” ? Thanks in Advance
Note : I find the following subject but didn’t help: Count Occurrence of word in OCR string - #3 by andrzej.kniola
Dears,
Is it possible to check the occurence of words in text extracted from “Get Visible OCR Text” ? Thanks in Advance
Note : I find the following subject but didn’t help: Count Occurrence of word in OCR string - #3 by andrzej.kniola
Of course if we get the output from get OCR text as a string variable so using if condition with contains method we can check the occurrence of the text in the output
Hello Palaniyappan, I want to use RegX in my case, possible to expalain how to use it? seems very useful
In fact my concern is to check the extracted text , if the last row contains “Key Word”
Fine
Hope this expression would help you
System.Text.RegularExpressions.Regex.IsMatch(yourvariable,”Key Word”).ToString
This will give us output whether it’s true or false like the keyword is there or not
Cheers @hsendel
yourvariable represents “extractedData”?
Or we can check with this expression either
If that doesn’t end with text rather just be there in the last line of the text then
This expression would help you
If the text is stored in str_input
Then
str_output = str_input.Split(Environment.Newline.ToArray()).last.ToString.Contains(“your keyword”).ToString
Cheers @hsendel
I’m updating the file…I will let you know. Thx
I tried both Methodes and didn’t work. Could you please help?CheckIfLastLineContainsWord.xaml (6.7 KB) Example.zip (384 Bytes)
Problem Solved with : Regex.IsMatch : How to check if last line of text file contains one word? - #9 by vickydas