using static System.Console;
public static void Main() {
var texto = "ZACKSON MOREIRA MORGAN (zackson.morgan)";
WriteLine(pegaTexto(texto));
texto = "ZACKSON MOREIRA MORGAN (zackson.morgan";
WriteLine(pegaTexto(texto));
texto = "ZACKSON MOREIRA MORGAN (";
WriteLine(pegaTexto(texto));
public static string pegaTexto(string texto) {
texto = texto.Substring(texto.IndexOf("(") + 1);
return texto.Substring(0, texto.IndexOf(")"));