From above file i need to extract below information -
ERR : Error Reading Detail Record Number <328>.
ERR : No Valid Institution for the specified Logo :
ERR : BAD Input file <09272021.csv> renamed to <09272021.csv.20210927.BAD>.
ERR : END_ERROR
ERR : Error Reading Detail Record Number <328>.
ERR : No Valid Institution for the specified Logo :
ERR : BAD Input file <09272021.csv> renamed to <09272021.csv.20210927.BAD>.
ERR : END_ERROR
NOTE - We need to extract all lines which consists of ERR.
It is dynamic in every scenario For eg in attach files there are 8 lines which consists ERR and for other files it may be 3,4,5 etc
Im using System.Text.RegularExpressions.Regex.Matches(YourString,β(?<=ERR\s*:\s)\S.*β),
but this expression only fetches 4 lines of Error in every text file.
Requirement is to fetch every line which consists ERR (which will dynamic)