import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
String regex
= "^([^_]+)_([^_]+)_"; String string
= "02_01_fEa3129E_my Pic.png";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(string);
String result
= matcher.
replaceFirst(subst
);
}
}
aW1wb3J0IGphdmEudXRpbC5yZWdleC5NYXRjaGVyOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4LlBhdHRlcm47CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN0cmluZyByZWdleCA9ICJeKFteX10rKV8oW15fXSspXyI7CgkJU3RyaW5nIHN0cmluZyA9ICIwMl8wMV9mRWEzMTI5RV9teSBQaWMucG5nIjsKCQlTdHJpbmcgc3Vic3QgPSAiJDEvJDIvIjsKCQkKCQlQYXR0ZXJuIHBhdHRlcm4gPSBQYXR0ZXJuLmNvbXBpbGUocmVnZXgpOwoJCU1hdGNoZXIgbWF0Y2hlciA9IHBhdHRlcm4ubWF0Y2hlcihzdHJpbmcpOwoJCVN0cmluZyByZXN1bHQgPSBtYXRjaGVyLnJlcGxhY2VGaXJzdChzdWJzdCk7CgkJCgkJU3lzdGVtLm91dC5wcmludGxuKHJlc3VsdCk7Cgl9Cn0=