问题描述
我要做的是解析文本文件中的文字。
10:06:59:卖出订单59266 5,000 TL在22.20排队账户的常规账本市场#CC1233
10:06:59:票据47930卖单59165266 5,000 TGL常规市场满22.20 - 剩余0对于账户#CC1233
10:31:57:买单59172 1,000 GHI在21.90排队在正常账户定期市场账户#CC1233
10:32:11:买入订单59127 2,000 PIC在25.31排队在常规账本定期市场账户#CC1233
10: 32:47:机票47922买入订单59173072 1,000 GHNI常规市场满21.90 - 剩余0对于账户#CC1233
10:35:29:买入订单59135 1,000 NYP在38.25排队在常规账本定期市场账户# CC1233
10:59:17:买入订单59056 2,000 MYF,18.35在常规账本常规市场排队等账号#CC1233
10:59:17:票据47959买入订单59180956 2,000 MLCF常规市场在18.35 - 剩余0对于账户#CC1322
10:59:36:买入订单59127 2,000 PYC为25.35更改为常规账户常规市场账户#CC1233
11:04:49:买入订单59707 5,000 BYL在14.70排队进入正常账户常规市场账户#CC1233
11:08:18:买入订单59635 1,000 NYP在38.50更改为常规账户常规市场账户#CC1233
11:08:18 :买入订单54035 1,000 NYP在38.50排队在常规账本常规市场账号#CC1233
11:08:18:票47318买单59174035 500 NYP常规市场满38.50 - 剩余500账户#CC1233
11:08:18:机票47959买入订单59174035 500 NYP常规市场满38.50 - 剩余0对于账户#CC1233
此文件通过另一个自动持续更新软件。我想用那个单词Ticket解析那些行,其中有一些其他行与其他文本。
分隔所选行(带有单词的单词) )使用空间并将其保存在数据库中。记住文件不断更新。
甚至可能..?
What i am trying to do is to parse below text from a text file.
10:06:59:Sell Order 59266 5,000 TL at 22.20 Queued in the Regular Book Regular Market for Account # CC1233 10:06:59: Ticket 47930 Sold Order 59165266 5,000 TGL Regular Market filled at 22.20 - remaining 0 For Account # CC1233 10:31:57:Buy Order 59172 1,000 GHI at 21.90 Queued in the Regular Book Regular Market for Account # CC1233 10:32:11:Buy Order 59127 2,000 PIC at 25.31 Queued in the Regular Book Regular Market for Account # CC1233 10:32:47: Ticket 47922 Bought Order 59173072 1,000 GHNI Regular Market filled at 21.90 - remaining 0 For Account # CC1233 10:35:29:Buy Order 59135 1,000 NYP at 38.25 Queued in the Regular Book Regular Market for Account # CC1233 10:59:17:Buy Order 59056 2,000 MYF at 18.35 Queued in the Regular Book Regular Market for Account # CC1233 10:59:17: Ticket 47959 Bought Order 59180956 2,000 MLCF Regular Market filled at 18.35 - remaining 0 For Account # CC1322 10:59:36: Buy Order 59127 2,000 PYC at 25.35 Changed in the Regular Book Regular Market for Account # CC1233 11:04:49:Buy Order 59707 5,000 BYL at 14.70 Queued in the Regular Book Regular Market for Account # CC1233 11:08:18: Buy Order 59635 1,000 NYP at 38.50 Changed in the Regular Book Regular Market for Account # CC1233 11:08:18:Buy Order 54035 1,000 NYP at 38.50 Queued in the Regular Book Regular Market for Account # CC1233 11:08:18: Ticket 47318 Bought Order 59174035 500 NYP Regular Market filled at 38.50 - remaining 500 For Account # CC1233 11:08:18: Ticket 47959 Bought Order 59174035 500 NYP Regular Market filled at 38.50 - remaining 0 For Account # CC1233
This file is continuously updated automatically via another software. I want to parse on those line with a word "Ticket" in it there are some other lines with other text.
Separate the selected line (the one with ticket word) using space and saving them in database. keeping in mind the file is updated continuously.
is it even possible..?
这篇关于使用特定条件解析文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!