I am facing issue with the Regex (regular expression)
I need to take next line or single line after the String “Beneficiary ” ,it is working fine when i scrap another String “Class:” line with the
regex →
System.Text.RegularExpressions.Regex.Match(Result,“(?<=(Class: )).*”).Value
But, When it comes to read next line after “Beneficiary” its not working what would be the regular expression
HI
welcome to uipath community
hope this text is in a txt file
–if so use READ TEXT FILE activity and get the output with a variable of type string named str_input
–now use a ASSIGN activity like this str_lines = String.Join(" ",str_input.Split(Environment.Newline.ToArray()))
now use a assign activity like this
to get the Beneficiary str_beneficiary = system.Text.RegularExpressions.Regex.Match(str_lines,“(?<=Beneficiary).*(?=Notice Type)”).ToString.Trim
and for class str_class = system.Text.RegularExpressions.Regex.Match(str_lines,“(?<=Class:).*(?=Valid)”).ToString.Trim
@Palaniyappan Thank You so much for response. I am tried that regex method i am getting the following-output, The string “Beneficiary ” name o/p comes along with Notice Type also. Its possible to get the exact "Beneficiary name " only??