Regex doubt

Hello everyone, I need to capture the 12 characters after the sentence “REF TE K7”

The reference for capture is “REF TE K7”, the numbering can come with or without text break.

He follows:

“Check its content, so that the customer can read it in full. Make sure it is in accordance with the terms and conditions. //REF TE K7
123456789123
TEST: 203456789011”

OR

“Check its content, so that the customer can read it in full. Make sure it is in accordance with the terms and conditions. //REF TE K7 123456789123
TEST: 203456789011”

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=REF TE K7\D*)\d{12}").Value

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.