if(input.Full_Name.contains("-") == true)
{
totallength = input.Full_Name.len();
indexof = input.Full_Name.lastIndexOf("-");
subString = input.Full_Name.subString(indexof,totallength).len();
if(subString < 3)
{
Fname = input.Full_Name.replaceAll(input.Full_Name.subString(indexof,totallength), "");
}
if (Fname.removeAllAlpha().len() > 0)
{
tName = Fname;
Fname = Fname.removeAllAlpha();
Fname = tName.replaceAll(Fname, "");
}
else
{
Fname = input.Full_Name;
}
input.New_Full_Name = Fname;
}
else
{
Fname = input.Full_Name;
if (Fname.removeAllAlpha().len() > 0)
{
tName = Fname;
Fname = Fname.removeAllAlpha();
Fname = tName.replaceAll(Fname, "");
info "Shubham";
}
input.New_Full_Name = Fname;
}
//==============================
if(input.Full_Name.contains("-") == true)
{
totallength = input.Full_Name.len();
indexof = input.Full_Name.lastIndexOf("-");
subString = input.Full_Name.subString(indexof,totallength).len();
if(subString < 3)
{
Fname = input.Full_Name.replaceAll(input.Full_Name.subString(indexof,totallength), "");
}
if (Fname.removeAllAlpha().len() > 0)
{
tName = Fname;
Fname = Fname.removeAllAlpha();
Fname = tName.getsuffix(Fname).replaceAll(Fname, "");
}
else
{
Fname = input.Full_Name;
}
input.New_Full_Name = Fname;
}
else
{
Fname = input.Full_Name;
if (Fname.removeAllAlpha().len() > 0)
{
tName = Fname;
Fname = Fname.removeAllAlpha();
suffixhave = tName.getsuffix(Fname);
if(suffixhave.len()>0)
{
Fname = Fname + suffixhave;
}
info suffixhave.len();
Fname = tName.replaceAll(Fname, "");
}
input.New_Full_Name = Fname;
}