using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
string str = "This is 2014 and the next year will be 2015";
string result = Regex.Replace(str, @"(\b\d{4}\b)", "($1)");
Console.WriteLine(result);
Console.ReadLine();
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CiAKcHVibGljIGNsYXNzIFRlc3QKewpwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCnsKc3RyaW5nIHN0ciA9ICJUaGlzIGlzIDIwMTQgYW5kIHRoZSBuZXh0IHllYXIgd2lsbCBiZSAyMDE1IjsKc3RyaW5nIHJlc3VsdCA9IFJlZ2V4LlJlcGxhY2Uoc3RyLCBAIihcYlxkezR9XGIpIiwgIigkMSkiKTsKQ29uc29sZS5Xcml0ZUxpbmUocmVzdWx0KTsKQ29uc29sZS5SZWFkTGluZSgpOwp9Cn0=