Using a string of letters and part of this string is not to be disclosed without the brackets. This line can be reduce the type of "(3A)" what is perceived as "AAA". This should make method.
The fact is that when searching using Regex.Match returns a blank. And for some reason can not understand.
So, somehow, Replace the brackets are ignoring me and are not removed (they are in target)
static string Zamena(string stroka,string target) // stroka - input string in which it is necessary to reveal target
string to_replace= ""; // something that will eventually be replaced by target
celb string = "";
Match find = Regex.Match(stroka, @"([0-9]*)");
int kolvo = Convert.ToInt32(find.Groups.Value); // number of repetitions
find = Regex.Match(stroka, @"(\w*)");
celb = find.Groups.Value; // what is repeated
for (int i = 1;i<=kolvo;i++)
to_replace += celb;
stroka = Regex.Replace(stroka, target,to_replace);