Regex expression Error

OCR Output.txt (1.7 KB)

How we can Create Regex Expression for this Text file ?( In pic red line shows string to be extract)


Can you please try this


str is where you would have your string from notepad


1 Like


Another approach:

Can you try the following sample?

mc = System.Text.RegularExpressions.Regex.Matches(strText,"\n\d+\s+(?<VALUE1>.*)[^\S\r\n]+[\d.,]+[^\S\r\n]+[\d.,]+[^\S\r\n]+[\d.,]+\r?\n(?<VALUE2>[^\r\n]*)\r?\n(?<VALUE3>[^\r\n]*)\r?\n(?<VALUE4>[^\r\n]*)(?=\r?\n)")

then mc(0).Groups(“VALUE1”).Value returns VALUE1 part, and finally this outputs the following sheet. (3.9 KB)


Thanks You…It helps me lot.

1 Like

Thank You Sir for your FeedBack.

1 Like