09:15 22.87 57900-- 0
09:15 22.87 58000-- 0
09:15 22.87 217700-- 0
09:16 22.87 60600-- 0
09:16 22.87 65000-- 0
09:16 22.87 65500-- 0
09:16 22.87 68300-- 0
09:17 22.87 68000-- 0
Normally,each line contains 4 elements separated by 2Tab, I can use word_array := StrSplit(line, " ") to get the elements.But sometimes the line may separated by 1Tab.Is there a way to solve the problem.
A problem of parse a string Topic is solved
Re: A problem of parse a string Topic is solved
Code: Select all
fileread, data, data.txt
MsgBox % RegExReplace(data, "\t+","`t")
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
- AlphaBravo
- Posts: 586
- Joined: 29 Sep 2013, 22:59
Re: A problem of parse a string
replace all 2-tab's with a single tab first then split.
Re: A problem of parse a string
Thank you very much!Odlanir wrote:Code: Select all
fileread, data, data.txt MsgBox % RegExReplace(data, "\t+","`t")
Re: A problem of parse a string
Thank you very much!AlphaBravo wrote:replace all 2-tab's with a single tab first then split.
Who is online
Users browsing this forum: dunnerca and 125 guests