How do i remove a text before character

I want to remove a text before character. Can someone please help ?

ex : Yotr Uvik wyuhagen@mandallegal.com → (I want to remove the text which is before @ ) or remove entire email wyuhagen@mandallegal.com from the given sentence.

@Palaniyappan

@Naresh_Mandava

Please try Split(yourString,“@”)(1).ToString.Trim

Best regards,
Marius

Hi,

Do you want to leave “Yotr Uvik” in output string? If so, the following will work.

System.Text.RegularExpressions.Regex.Replace(yourString,"\S+(?=@)","")

Regards,

Thank you for quick response and help @Yoichi and @Marius_Puscasu . It worked

1 Like

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