JID Prio Date S Owner Number Pages Dials Status 97 127 2002/07/23 D test 8610757 1:1 1:12 now 98 127 2002/07/23 D root 8610757 1:1 1:12 100 127 2002/07/23 F root 8610757 0:0 0:12 Blocked by job 是啊,,我也想过用正则表达式,但是不知怎么写那规则, 我也用过了StringTokenzier都不能分出最有一列里带有多个空串的整个列的 subString 就更难实现了.
同意tomcat4(tom)的办法,虽然土些,还是可以的。
那如何定位 substring 的起始啊??有点昏了.
try again: public String substring(int beginIndex, int endIndex) Examples: "hamburger".substring(4, 8) returns "urge" "smiles".substring(1, 5) returns "mile"
这个列的列数有时是不定的,而且每列之间空格数也没有定的.
所以比较的麻烦,我在用split来提取JID这行时,就出了个三十列的
数组维数啊?? 够难度的了..
请大家帮想想有什么办法做这东西??
他会自动提取的
JDK1.4 可以用正则表达式。
97 127 2002/07/23 D test 8610757 1:1 1:12 now
98 127 2002/07/23 D root 8610757 1:1 1:12
100 127 2002/07/23 F root 8610757 0:0 0:12 Blocked by job
是啊,,我也想过用正则表达式,但是不知怎么写那规则,
我也用过了StringTokenzier都不能分出最有一列里带有多个空串的整个列的
subString 就更难实现了.
public String substring(int beginIndex,
int endIndex)
Examples: "hamburger".substring(4, 8) returns "urge"
"smiles".substring(1, 5) returns "mile"