
harry34
stranger
Jul 14, 2003, 2:54 AM
Post #1 of 2
(7663 views)
|
matching between two strings
|
Can't Post
|
|
I have a file which contains numerous datasets having the following format, see below: I need to extract the data between Final graph set matrix and PLUTO4 finished each time it is present in the file (so need some sort of loop). I have the following pattern for matching the data:
/([A-Z]\s\d+,\s\d+\(\s*\d+\))/g Also I need each data seperated by a title or new line Can anyone help Final graph set matrix ---------- C 1, 1( 9) ---------- C 2, 2(11) C 1, 1( 4) ---------- C 2, 2(18) C 1, 2(11) C 1, 1( 9) [R 2, 2( 8)] ---------- C 1, 2(11) C 2, 2(18) C 2, 2(11) C 1, 1( 4) [R 2, 2(18)] PLUTO4 finished Final graph set matrix ---------- C 1, 1( 4) ---------- C 2, 2(18) C 1, 1( 4) [R 2, 2(18)] PLUTO4 finished Final graph set matrix ---------- C 1, 1( 4) ---------- C 2, 2(18) C 1, 1( 4) [R 2, 2(18)] ---------- C 2, 2(11) C 2, 2(11) C 1, 1( 9) ---------- C 2, 2(11) C 2, 2(11) C 2, 2(18) C 1, 1( 9) [R 2, 2( 4)] PLUTO4 finished
|