import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
String sampleString
= "jrp_jasper.jrp_jas_nome|0;jrp_jasper.jrp_jas_sobrenome|1"; String[] items
= sampleString.
split(";");
String nomeColuna
= item.
replace("|",
"").
replace(".",
"_");
if (nomeColuna.endsWith("0")){
// Se terminar em 0
nomeColuna = nomeColuna.substring(0, nomeColuna.length() - 1);
System.
out.
println(nomeColuna
); }
else if (nomeColuna.endsWith("1")){
// Se terminar em 1
System.
out.
println(nomeColuna
); }
else{
// Não termina em 0 nem 1
System.
out.
println(nomeColuna
); }
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJU3RyaW5nIHNhbXBsZVN0cmluZyA9ICJqcnBfamFzcGVyLmpycF9qYXNfbm9tZXwwO2pycF9qYXNwZXIuanJwX2phc19zb2JyZW5vbWV8MSI7CgkJU3RyaW5nW10gaXRlbXMgPSBzYW1wbGVTdHJpbmcuc3BsaXQoIjsiKTsKCQkKCQlmb3IoU3RyaW5nIGl0ZW06IGl0ZW1zKXsKCQkJU3RyaW5nIG5vbWVDb2x1bmEgPSBpdGVtLnJlcGxhY2UoInwiLCAiIikucmVwbGFjZSgiLiIsICJfIik7CgkJCQoJCQlpZiAobm9tZUNvbHVuYS5lbmRzV2l0aCgiMCIpKXsKCQkJCS8vIFNlIHRlcm1pbmFyIGVtIDAKCQkJCW5vbWVDb2x1bmEgPSBub21lQ29sdW5hLnN1YnN0cmluZygwLCBub21lQ29sdW5hLmxlbmd0aCgpIC0gMSk7CgkJCQlTeXN0ZW0ub3V0LnByaW50bG4obm9tZUNvbHVuYSk7CgkJCX0KCQkJZWxzZSBpZiAobm9tZUNvbHVuYS5lbmRzV2l0aCgiMSIpKXsKCQkJCS8vIFNlIHRlcm1pbmFyIGVtIDEKCQkJCVN5c3RlbS5vdXQucHJpbnRsbihub21lQ29sdW5hKTsKCQkJfQoJCQllbHNlewoJCQkJLy8gTsOjbyB0ZXJtaW5hIGVtIDAgbmVtIDEKIAkJCQlTeXN0ZW0ub3V0LnByaW50bG4obm9tZUNvbHVuYSk7CgkJCX0KCQl9Cgl9Cn0=