using System.Text.RegularExpressions;
public static void Main()
var input = "12340001234567";
var wrongInput = "12340011234567";
Console.WriteLine(ConvertAccountIdToBban(input));
Console.WriteLine(ConvertAccountIdToBban(wrongInput));
public static string ConvertAccountIdToBban(string input)
return Regex.Replace(input, @"^([0-9]{4})000([0-9]{7})$", "$1-$2", RegexOptions.Compiled);