/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
final String regex
= "(?=[A-Z][a-z])"; final String string
= "B2BNewQuoteProcess";
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(string);
// The substituted value will be contained in the result variable
final String result
= matcher.
replaceAll(subst
);
System.
out.
println("Substitution result: " + result.
toLowerCase()); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguTWF0Y2hlcjsKaW1wb3J0IGphdmEudXRpbC5yZWdleC5QYXR0ZXJuOwoKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlmaW5hbCBTdHJpbmcgcmVnZXggPSAiKD89W0EtWl1bYS16XSkiOwoJCWZpbmFsIFN0cmluZyBzdHJpbmcgPSAiQjJCTmV3UXVvdGVQcm9jZXNzIjsKCQlmaW5hbCBTdHJpbmcgc3Vic3QgPSAiLSI7CgkJCgkJZmluYWwgUGF0dGVybiBwYXR0ZXJuID0gUGF0dGVybi5jb21waWxlKHJlZ2V4KTsKCQlmaW5hbCBNYXRjaGVyIG1hdGNoZXIgPSBwYXR0ZXJuLm1hdGNoZXIoc3RyaW5nKTsKCQkKCQkvLyBUaGUgc3Vic3RpdHV0ZWQgdmFsdWUgd2lsbCBiZSBjb250YWluZWQgaW4gdGhlIHJlc3VsdCB2YXJpYWJsZQoJCWZpbmFsIFN0cmluZyByZXN1bHQgPSBtYXRjaGVyLnJlcGxhY2VBbGwoc3Vic3QpOwoJCQoJCVN5c3RlbS5vdXQucHJpbnRsbigiU3Vic3RpdHV0aW9uIHJlc3VsdDogIiArIHJlc3VsdC50b0xvd2VyQ2FzZSgpKTsKCX0KfQ==