Pulling out data from a line of text in C++ using regex -


I have a text file in my format:

  number tab word tab word tab junk Number tab word tab word tab junk number tab word tab word tab junk number tab word tab word tab junk number tab word tab word tab junk  

I want to put numbers for each line a uint32_t In, then two words in the string and then ignore the remaining line That I can load and then I could work through one byte at a time, but I'm a pretty regex believe could do this for me. Any ideas?

I am working in C ++ in Xcode using #include - this is a command line tool, so there is no real output, I just stored data to compare with other data I am doing

  External Boole DoStuff (unsigned n, const std :: string and s0, const std: : String & amp; s1); Bool ProcessFile (const std :: string & amp; sFileName) {std :: ifstream ifs (sFileName); If (! Ifs) return false; While (ifs) {unsigned n; Std :: string s0, s1; IFS & gt; & Gt; N & gt; & Gt; S 0 & gt; & Gt; S1; If (ifs.bad () ||! Dustf (N, S, S1)) false return; Ifs.ignore (std :: numeric_limits & lt; int & gt; :: max), '\ n'); } Return! Ifs.bad (); }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -