using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:(?!\/)).*(?:\/)(.[A-Z0-9]*[-][0-9]*)";
string input = @"""Currently WV Patients are having difficulty reading some of the information on Key pages like product pages/shipping information etc. this story is to fix some of the font colors/size etc for better user experience. UP9-9999\n\n
[https://our-domain.atlassian.net/browse/UP-7930#icft=UP-7930|https://our-domain.atlassian.net/browse/UP-7930#icft=UP-7930] \n\n
[https://our-domain.atlassian.net/browse/UP-6744#icft=UP-6744|https://our-domain.atlassian.net/browse/UP1-6744#icft=UP-6744]\n\n
and\n\n\
[https://our-domain.atlassian.net/browse/UP-6396|https://emersonecologics.atlassian.net/browse/UP-6396] \n\n
end more\n\n
[https://our-domain.net/browse/UP-5746|https://emersonecologics.atlassian.net/browse/UP2-5746]\n\n
test 2"",";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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