using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(https:\/\/vk\.com.+\b(?<!\.png))$";
string substitution = @"";
string input = @"https://vk.com/images/iemoj/D83DDE0E.png
fdsfds https://vk.com/sadovodxasanov vcxfdsfds
fdsfdsfdf https://vk.com/id080845122210 fdsfdsffds
";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx