Hi want to extract 2 fields from below highlighted text please help
Loan Account Number: Borrower Name:
200641216 Realty Corporation
Payment Details (Optional):
107-109 Vermilyea Ave
3020-1172645
Checkist Items (Required: Please choose one) Done
Hi want to extract 2 fields from below highlighted text please help
Loan Account Number: Borrower Name:
200641216 Realty Corporation
Payment Details (Optional):
107-109 Vermilyea Ave
3020-1172645
Checkist Items (Required: Please choose one) Done

(\d{9})

(?<=[A-Z a-z():]+\s+)\d{3}-\d{3}\s+[A-Za-z \s]+\d{4}-\d{7}
I’ve edited it again please check and help to extract text in bold letters
system.text.RegularExpressions.Regex.Match(inputstr,"(?<=Borrower Name:)\n.*\n\d+").Value.trim
system.text.RegularExpressions.Regex.Match(inputstr,"(?<=\(Optional\):)[\s\S]+").Value.trim
can try this
Hi,
How about the following?
m = System.Text.RegularExpressions.Regex.Match(yourString,"Loan Account Number: Borrower Name:\s+(?<FIRST>\d+)[\s\S]+?Payment Details \(Optional\):\s+(?<SECOND>[\s\S]+?)Checkist Items \(Required: Please choose one\)")
Then
m.Groups("FIRST").Value
m.Groups("SECOND").Value
note: m is Match type
Sample
Sequence3.xaml (6.7 KB)
Regards,
Input= "Loan Account Number: Borrower Name:
200641216 Realty Corporation
Payment Details (Optional):
107-109 Vermilyea Ave
3020-1172645"
Output= System.Text.RegularExpressions.Regex.Match(Input,"(?<=Borrower Name:\s\n)\d+").Value
Input= "Loan Account Number: Borrower Name:
200641216 Realty Corporation
Payment Details (Optional):
107-109 Vermilyea Ave
3020-1172645"
Output= System.Text.RegularExpressions.Regex.Match(Input,"\d+\-\d+\s*\w.*\s*\n.*").Value
Hope it helps!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.