Linked Questions

Popular Questions

How to eliminate data while retaining specific items

Asked by At

I am trying to clean up the output from an ECG in order to further analyze heart rate variability. Specifically, I need to remove everything from the text file EXCEPT the numbers between the word "start" so the only thing that is left is one column of numbers.

Here is an example of what the output looks like:

<EMSE_Event_List>
<bSaveNotation>0</bSaveNotation>
<sQID></sQID>
<bUseQID>1</bUseQID>
<Event><Name>[seg]</Name><Start>0</Start><Stop>0</Stop>  
<Status>1</Status><Color>255</Color><Attribute>0</Attribute>  
<TimeStart>0</TimeStart><TimeStop>0</TimeStop>  
<FreqStart>0</FreqStart><FreqStop>0</FreqStop>  
<FWHM_Time>0</FWHM_Time><FWHM_Freq>0</FWHM_Freq></Event>
<Event><Name>R</Name><Start>186</Start><Stop>186</Stop>  
<Status>2</Status><Color>255</Color><Attribute>0</Attribute>  
<TimeStart>0</TimeStart><TimeStop>0</TimeStop> 
<FreqStart>0</FreqStart><FreqStop>0</FreqStop>

Related Questions