Regex after a specific string and new line

Hello everyone,

This is my string which is mailbody;

E-posta adresinizi doğrulama işlemine devam edebilmek için aşağıdaki kodu kullanabilirsiniz.

Doğrulama kodu:

155036

Bu e-posta, talebiniz dışında iletildiyse lütfen musterihizmetleri@kariyer.net e-posta adresi veya 0(216) 468 76 00 numaralı telefon üzerinden bizimle iletişime geçin.

In order to get “155036” , I have used this regex expression;

System.Text.RegularExpressions.Regex.Match(mailBody, “(?<=kodu:\n\n).*”).ToString

When it comes to using it in Uipath, It gives me an empty string

Is there any idea what might be the problem?

Thanks in advance

@lakshman @Palaniyappan

try this

System.Text.RegularExpressions.Regex.Match(mailBody, "kodu:[\s]+([\d]+)").Groups(1).Value
image

HI @Zeki_Berk_Gokkaya,
Try Below Code
System.Text.RegularExpressions.Regex.IsMatch(mailBody, "(?<=kodu:\n\n).*").ToString()

Regards,
Arivu

Thanks, it worked

Do you have an idea what was wrong with my previous expression?

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