c# - Splitting data with inconsistent delimiters -
c# - Splitting data with inconsistent delimiters -
i have these info files comming in on server need split [date time] , [value]. of them delimited single time between time , value , between date , time space
. have programme processing info simple split(char[]) found info delimiter space
, wondering how tackle best.
so files encountered this:
18-06-2014 12:00:00|220.6
the delimiters vary, tackled char[]. today ran problem on format:
18-06-2014 12:00:00 220.6
this complicates things little. easy solution add together space
split characters , when find 3 splits combine first 2 before processing?
i'm looking 2nd opining on matter. time format can alter d/m/yy
, amount of lines can run millions maintain efficient possible.
yes believe efficient solution add together space delimiter , combine first 2 if three. going be more efficient regex.
c# .net regex split delimiter
Comments
Post a Comment