Help with parsing
Posted: 10 Mar 2009 05:41
Hi there, i need a little help with parsing this text for example:
------------------------------------------------------------------------
r637 | johndoe | 2009-03-03 20:22:37 +0100 (tue, 03 mar 2009) | 1 line
------------------------------------------------------------------------
r636 | johndoe | 2009-03-03 20:21:25 +0100 (tue , 03 mar 2009) | 1 line
T_090303
------------------------------------------------------------------------
r635 | johndoe | 2009-03-03 20:15:33 +0100 (tue, 03 mar 2009) | 1 line
------------------------------------------------------------------------
r389 | johndoe | 2009-02-02 15:14:53 +0100 (mon, 02 feb 2009) | 1 line
T_090202
------------------------------------------------------------------------
I need to take revisson number (r636 for example) from the last tagged version (T_090303). So in this case i would like to store r636 in a variable because T_090303 means it is the last tagged version.
I've tried to do that using for /f but i don't know how to do it right.
Thanks in advance.
------------------------------------------------------------------------
r637 | johndoe | 2009-03-03 20:22:37 +0100 (tue, 03 mar 2009) | 1 line
------------------------------------------------------------------------
r636 | johndoe | 2009-03-03 20:21:25 +0100 (tue , 03 mar 2009) | 1 line
T_090303
------------------------------------------------------------------------
r635 | johndoe | 2009-03-03 20:15:33 +0100 (tue, 03 mar 2009) | 1 line
------------------------------------------------------------------------
r389 | johndoe | 2009-02-02 15:14:53 +0100 (mon, 02 feb 2009) | 1 line
T_090202
------------------------------------------------------------------------
I need to take revisson number (r636 for example) from the last tagged version (T_090303). So in this case i would like to store r636 in a variable because T_090303 means it is the last tagged version.
I've tried to do that using for /f but i don't know how to do it right.
Thanks in advance.