Regular expression to extract data between 2 keywords

Hi,
I’m passing out the data extracted from PDF into a notepad and from that i need to extract the specific keywords.

In below, i need to extract the data that comes after Factura/Rechnung and before CUN - output should be 2952520-0


Factura/Rechnung

2952520-0
CUN Pg.: 1

Can someone please help with the regex expression or suggest any simpler method

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Factura/Rechnung\s*).*(?=\s*CUN)").Value

Regards,