ファイル (2 列) をreadLine();に分割する方法を見つけようとしています。多くの区切り文字を考慮することによって (以下を参照)。
これが私の区切り文字のすべての可能性です(コメントを参照)
+--------+---------+
+ ##some text + //some text which starts with (##) I want to exclude this row
+ 341, 222 + //comma delimited
+ 211 321 + //space delimited
+ 541 1231 + //tab delimited
+ ##some text + //some text which starts with (##) I want to exclude this row
+ 11.3 321.11 + //double values delimited by tab
+ 331.3 33.11 + //double values delimited by space
+ 231.3, 33.1 + //double values delimited by comma
+ ##some text + //some text which starts with (##) I want to exclude this row
+--------+---------+
このテーブルを取得したい:
+--------+---------+
+ 341 222 +
+ 211 321 +
+ 541 1231 +
+ 11.3 321.11 +
+ 331.3 33.11 +
+ 231.3 33.1 +
+--------+---------+
この問題の解決策を見つけて喜んでいます
アップデート:
今のところ、私は([,\s\t;])+ (コンマ、タブ、スペース、セミコロン...) を持っていますが、##some テキストに対して行う方法がわかりません。\##\w+ を試しましたが、うまくいきませんでした。何かアドバイス?