EX: This is my output “Hi everyone, I hope u r doing good.
Happy Automation.”
If the above text contains “hope”, I want to get that full sentence.
I hope u clear, Thanks in advance.
Hi,
How about the following?
Or do you need extract a sentence which has “hope”? If so, can you share expected result?
Regards,
Hi @raja_ias
I believe i have understood your requirements. The Regex pattern I have used is:
[^.]*hope[^.]*
Sample workflow:
Main.xaml (7.3 KB)
Output pane:
Further to Yoichi’s post the expected output would be benefit those looking to assist
Hopefully this helps you.
Hi
Hope you are getting that output in a variable named stroutput
Sometimes the word hope can come like HOPE or Hope or hope
In that case use this one single assign activity to validate and get the sentence
Stroutput = IF(strinput.ToString.ToUpper.Contains(“HOPE”), strinput.ToString, String.Empty)
Here stroutput is a string variable
We are using a IF condition in a assign activity itself
Where the structure is like this
IF(condition, True means this expression , False means this expression )
So here if it’s sentence has Hope in any format then it will give the complete sentence or it will give a empty value to the output variable
Hope this would help you resolve this issue
Cheers @raja_ias
Hey
Some more samples would be good
We need to determine a pattern from multiple samples to create a robust working Regex Pattern.
Take a look at this pattern if you want until the next line.
Regex Pattern:
[^\.]*hope[^\n]*
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.