/* package whatever; // don't place package name! */
import java.util.ArrayList ;
import java.util.List ;
import java.util.regex.* ;
class Ideone {
String input
= "name:\" SFATG\" ;affil:100;aup:1;bu:FALSE name:\" SF TAC 1\" ;affil:29.3478;aup:19;bu:FALSE name:\" SF TAC 2\" ;affil:22.2222;aup:14;bu:FALSE name:\" SF TAC 3\" ;affil:44.4444;aup:0;bu:FALSE name:\" SF DISP 4\" ;affil:82.4742;aup:0;bu:FALSE " ;
Pattern p = Pattern.compile ( "\\ w+:(?:\" ([^\" ]+)\" |(\\ d+)(?=;|\\ Z)|(\\ d+\\ .\\ d+)|([A-Z]+\\ s))" ) ;
Matcher m = p.matcher ( input) ;
while ( m.find ( ) ) {
System .
out .
println ( "Found " + m.
group ( ) + "." ) ; }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC5BcnJheUxpc3Q7CmltcG9ydCBqYXZhLnV0aWwuTGlzdDsKaW1wb3J0IGphdmEudXRpbC5yZWdleC4qOwoKY2xhc3MgSWRlb25lIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbiB7CgkJU3RyaW5nIGlucHV0ID0gIm5hbWU6XCJTRkFUR1wiO2FmZmlsOjEwMDthdXA6MTtidTpGQUxTRSBuYW1lOlwiU0YgVEFDIDFcIjthZmZpbDoyOS4zNDc4O2F1cDoxOTtidTpGQUxTRSBuYW1lOlwiU0YgVEFDIDJcIjthZmZpbDoyMi4yMjIyO2F1cDoxNDtidTpGQUxTRSBuYW1lOlwiU0YgVEFDIDNcIjthZmZpbDo0NC40NDQ0O2F1cDowO2J1OkZBTFNFIG5hbWU6XCJTRiBESVNQIDRcIjthZmZpbDo4Mi40NzQyO2F1cDowO2J1OkZBTFNFICI7CgoJCVBhdHRlcm4gcCA9IFBhdHRlcm4uY29tcGlsZSgiXFx3KzooPzpcIihbXlwiXSspXCJ8KFxcZCspKD89O3xcXFopfChcXGQrXFwuXFxkKyl8KFtBLVpdK1xccykpIik7CgoJCU1hdGNoZXIgbSA9IHAubWF0Y2hlcihpbnB1dCk7CgoJCXdoaWxlIChtLmZpbmQoKSkgewoJCQlTeXN0ZW0ub3V0LnByaW50bG4oIkZvdW5kICIgKyBtLmdyb3VwKCkgKyAiLiIpOwoJCX0KCX0KfQ==