gpt4 book ai didi

java - 如何解析此输出并分隔每个字段/单词

转载 作者:行者123 更新时间:2023-11-30 07:38:29 28 4
gpt4 key购买 nike

这是阿克沙塔。我一直在解析以下数据。我想单独获取每个单词。我可以有一个示例代码以便我可以继续吗

 RTRV-HDR   RH01 


SIMULATOR 09-11-18 16 13 19


M RH01 COMPLD


RTRV-EQPT ALL RE01


SIMULATOR 09-11-18 16 13 20


M RE01 COMPLD


SLOT-1-1-1 CMP IS-NR


SLOT-1-1-2 CMP IS-NR


SLOT-1-1-3 OLC IS-NR


SLOT-1-1-4 OLC IS-NR


SLOT-1-1-5 OLC IS-NR


SLOT-1-1-6 OLC IS-NR


SLOT-1-1-7 OLC IS-NR


SLOT-1-1-8 OLC IS-NR


SLOT-1-1-9 IOC IS-NR


SLOT-1-1-10 IOC IS-NR


SLOT-1-2-1 NMC IS-NR


SLOT-1-2-2 NMC IS-NR


SLOT-1-2-3 OLC IS-NR


SLOT-1-2-4 OLC IS-NR


SLOT-1-2-5 OLC IS-NR


SLOT-1-2-6 OLC IS-NR


SLOT-1-2-7 OLC IS-NR


SLOT-1-2-8 OLC IS-NR


RTRV-ALM-EQPT ALL RA01


SIMULATOR 09-11-18 16 13 21


M RA01 COMPLD


SLOT-1-1-1 CMP MN T-FANCURRENT-1-HIGH NSA 01-10-09 00-00-00 \Fan-T\


SLOT-1-1-1 CMP MJ T-BATTERYPWR-2-LOW NSA 01-10-09 00-00-00 \Battery-T\


SLOT-1-1-2 CMP CR PROC_FAIL SA 09-11-18 16-12-59 \Processor Failure\


SLOT-1-1-3 OLC MN T-LASERCURR-1-HIGH SA 01-10-07 13-21-03 \Laser-T\


SLOT-1-1-3 OLC MJ T-LASERCURR-2-LOW NSA 01-10-02 21-32-11 \ Laser-T\


SLOT-1-1-4 OLC MN T-LASERCURR-1-HIGH SA 01-10-05 02-14-03 \Laser-T\


SLOT-1-1-4 OLC MJ T-LASERCURR-2-LOW NSA 01-10-04 01-03-02 \Laser-T\


RTRV-ALM-EQPT ALL RA02 MJ

SIMULATOR 09-11-18 16 13 21


M RA02 COMPLD


SLOT-1-1-1 CMP MJ T-BATTERYPWR-2-LOW NSA 01-10-09 00-00-00 \Battery-T\


SLOT-1-1-3 OLC MJ T-LASERCURR-2-LOW NSA 01-10-02 21-32-11 \ Laser-T\


SLOT-1-1-4 OLC MJ T-LASERCURR-2-LOW NSA 01-10-04 01-03-02 \Laser-T\


RTRV-ALM-EQPT ALL RA03 MN


SIMULATOR 09-11-18 16 13 22


M RA03 COMPLD


SLOT-1-1-1 CMP MN T-FANCURRENT-1-HIGH NSA 01-10-09 00-00-00 \Fan-T\


SLOT-1-1-3 OLC MN T-LASERCURR-1-HIGH SA 01-10-07 13-21-03 \Laser-T\


SLOT-1-1-4 OLC MN T-LASERCURR-1-HIGH SA 01-10-05 02-14-03 \Laser-T\


RTRV-ALM-EQPT ALL RA04 MN T-LASERCURR-1-HIGH


SIMULATOR 09-11-18 16 13 22


M RA04 COMPLD


SLOT-1-1-3 OLC MN T-LASERCURR-1-HIGH SA 01-10-07 13-21-03 \Laser-T\


SLOT-1-1-4 OLC MN T-LASERCURR-1-HIGH SA 01-10-05 02-14-03 \Laser-T\


RTRV-PM-EQPT ALL RP01


SIMULATOR 09-11-18 16 13 23


M RP01 COMPLD


SLOT-1-1-1 CMP FANCURRENT-1 180.080


SLOT-1-1-1 CMP FANCURRENT-2 204.660


SLOT-1-1-1 CMP FANCURRENT-3 230.500


SLOT-1-1-1 CMP FANCURRENT-4 187.580


SLOT-1-1-1 CMP BATTERYPWR-1 53.650


SLOT-1-1-1 CMP BATTERYPWR-2 53.650


SLOT-1-1-2 CMP FANCURRENT-1 180.080


SLOT-1-1-2 CMP FANCURRENT-2 204.660


SLOT-1-1-2 CMP FANCURRENT-3 230.500


SLOT-1-1-2 CMP FANCURRENT-4 187.580


SLOT-1-1-2 CMP BATTERYPWR-1 53.650


SLOT-1-1-2 CMP BATTERYPWR-2 53.650


SLOT-1-1-3 OLC LASERPWR-1 200.00


SLOT-1-1-3 OLC LASERPWR-2 200.00


SLOT-1-1-4 OLC LASERPWR-1 200.00


SLOT-1-1-4 OLC LASERPWR-2 200.00


SLOT-1-1-5 OLC LASERPWR-1 200.00


SLOT-1-1-5 OLC LASERPWR-2 200.00


SLOT-1-1-6 OLC LASERPWR-1 200.00


SLOT-1-1-6 OLC LASERPWR-2 200.00


SLOT-1-1-7 OLC LASERPWR-1 200.00


SLOT-1-1-7 OLC LASERPWR-2 200.00


SLOT-1-1-8 OLC LASERPWR-1 200.00


SLOT-1-1-8 OLC LASERPWR-2 200.00


SLOT-1-2-3 OLC LASERPWR-1 200.00


SLOT-1-2-3 OLC LASERPWR-2 200.00


SLOT-1-2-4 OLC LASERPWR-1 200.00


SLOT-1-2-4 OLC LASERPWR-2 200.00


SLOT-1-2-5 OLC LASERPWR-1 200.00


SLOT-1-2-5 OLC LASERPWR-2 200.00


SLOT-1-2-6 OLC LASERPWR-1 200.00


SLOT-1-2-6 OLC LASERPWR-2 200.00


SLOT-1-2-7 OLC LASERPWR-1 200.00


SLOT-1-2-7 OLC LASERPWR-2 200.00


SLOT-1-2-8 OLC LASERPWR-1 200.00


SLOT-1-2-8 OLC LASERPWR-2 200.00


INIT-SYS SLOT-1-1-2 IS01 1


SIMULATOR 09-11-18 16 13 23


M IS01 COMPLD

感谢您宝贵的回复。

最佳答案

我会尝试 String.split()。像这样的……

String [] words;<br/>
words = line.split("\s+");

以上在空格处分割字符串。

关于java - 如何解析此输出并分隔每个字段/单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1760930/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com