using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"([a-zA-Z])\d+(?:, \d+)*";
string substitution = @"\1";
string input = @"'interspersed by 1,6-hexanediol, corresponds to the immobile component observed with FRAP. Consistent with this idea, the immobile fraction of HP 1a.... own to arise through phase separation23. N&B analysis of GFP–fibrillarin highlighted areas of consistently high variance (2.38 ± 0.46 -mers) at the nucleolar boundary, compared to inside (1.28 ± 0.36) or outside (1.17 ± 0.25) the domain24, 25, 26. Similarly, GFP–HP 1a displayed increased variance34, 37";
Regex regex = new Regex(pattern);
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