/ Published in: Java
Expand |
Embed | Plain Text
//http://cc-cedict.org/wiki/start Pattern line_pattern = Pattern.compile("([^\\s]+)\\s([^\\s]+)\\s(\\[.+\\])\\s(/.+/)"); Matcher matcher = line_pattern.matcher(line); boolean matchFound = matcher.find(); while(matchFound) { for(int i = 0; i <= matcher.groupCount(); i++) { } if(matcher.end() + 1 <= line.length()) { matchFound = matcher.find(matcher.end()); } else{ break; } } T字帳 T字帐 [T zi4 zhang4] /T-account (accounting)/ 0-47 0:T字帳 T字帐 [T zi4 zhang4] /T-account (accounting)/ 1:T字帳 2:T字帐 3:[T zi4 zhang4] 4:/T-account (accounting)/
You need to login to post a comment.
