/* package whatever; // don't place package name! */
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
final String regex
= "(?:(//\\w+\\s+JOB(?: \\w+)?)\\h*|\\G(?!^)),(\\w+=\\w+)"; final String string
= "//ADBB503 JOB ,MSGCLASS=2,CLASS=P\n";
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
if (null != matcher.group(1)) {
System.
out.
println(matcher.
group(1)); }
System.
out.
println(matcher.
group(2));
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lk1hdGNoZXI7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguUGF0dGVybjsKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWZpbmFsIFN0cmluZyByZWdleCA9ICIoPzooLy9cXHcrXFxzK0pPQig/OiBcXHcrKT8pXFxoKnxcXEcoPyFeKSksKFxcdys9XFx3KykiOwoJCWZpbmFsIFN0cmluZyBzdHJpbmcgPSAiLy9BREJCNTAzICBKT0IgLE1TR0NMQVNTPTIsQ0xBU1M9UFxuIjsKCQkKCQlmaW5hbCBQYXR0ZXJuIHBhdHRlcm4gPSBQYXR0ZXJuLmNvbXBpbGUocmVnZXgpOwoJCWZpbmFsIE1hdGNoZXIgbWF0Y2hlciA9IH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