How do I extract particular column from unformatted text in .txt file
Show older comments
Internet Protocol, Src: 0.0.66.242 (0.0.66.242), Dst: 10.0.0.3 (10.0.0.3)
Data (22 bytes)
0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 ......
Time Stamp Sequence Num Packet Size Destination IP Packet Num Time Interval Protocol
0.034272 0.0.66.243 60 10.0.0.3 10 0.002262 IP
Frame 10 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: AsustekC_60:6d:80 (00:1d:60:60:6d:80)
Internet Protocol, Src: 0.0.66.243 (0.0.66.243), Dst: 10.0.0.3 (10.0.0.3)
Data (22 bytes)
0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 ......
Time Stamp Sequence Num Packet Size Destination IP Packet Num Time Interval Protocol
0.040435 0.0.66.244 60 10.0.0.3 11 0.006163 IP
Frame 11 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: AsustekC_60:6d:80 (00:1d:60:60:6d:80)
Internet Protocol, Src: 0.0.66.244 (0.0.66.244), Dst: 10.0.0.3 (10.0.0.3)
Data (22 bytes)
0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 ......
Time Stamp Sequence Num Packet Size Destination IP Packet Num Time Interval Protocol
0.043839 0.0.66.245 60 10.0.0.3 12 0.003404 IP
Frame 12 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: AsustekC_60:6d:80 (00:1d:60:60:6d:80)
Internet Protocol, Src: 0.0.66.245 (0.0.66.245), Dst: 10.0.0.3 (10.0.0.3)
Data (22 bytes)
This is my list of data from the .txt file from which I need to extract Sequence Number data which is 0.0.66.xxx. How do I do it?
4 Comments
Guillaume
on 8 Jul 2019
As usual, please attach an example text file so we don't have to guess at its formatting (particularly, are tabs characters used to delimitate columns or space characters?)
Prashanth Kumar Herooru Sheahagiri
on 8 Jul 2019
Edited: Prashanth Kumar Herooru Sheahagiri
on 8 Jul 2019
I do not know about the delimiter status
Attaching an example test file (as opposed to copy pasting into a browser which may or may not alter the actual characters of the file), would allow us to find out.
Note taht if you're using wireshark, it has options to export in text formats that are a lot easier to import into matlab than what you show (e.g. csv format).
dpb
on 8 Jul 2019
"... wireshark ... has options to export in text formats that are a lot easier to import into matlab than what you show (e.g. csv format)."
+127
Accepted Answer
More Answers (0)
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!