Regex Problem

System.Text.RegularExpressions.Regex.Match(outpuit,"(?<=(Invoice Number)).*").Value

Here i have two text file which is present into the directory and contain the data Invoice Number and other
but here in two text file one invoice number index is “Invoice Number” and other invoice number index is “Invoice No” now i want to store the both invoice number to excel now in regex condition how to add condition so it get invoice number for second format also

here is my demo
MTextFile.zip (10.4 KB)

@Sandeep_Kumar2 add below regex expression assigned InvoiceNumber

    InvoiceNumber = System.Text.RegularExpressions.Regex.Match(outpuit,"(?<=(Invoice Number|Invoice No)).*").Value
1 Like