Can anyone come up with any ideas for adressing this issue? I've been asked to produce some figures from my Change Request database, including how many Change Requests went through peer review but subsequently failed testing, and this one has me stumped. I have pulled out the raw data, thus ending up with several thousand lines like these:
What I need to get is the number of lines like line 5 above, where 'IN_peer_review' appears JUST ONCE before 'IN_in_test' appears TWO or more times. 'IN_peer_review' may appear several times after (i.e. to the right) of any appearance of 'IN_in_test'. These are of no consequence to me.
Thus,
....IN_peer_review.....IN_in_test.....IN_in_test.....
is the pattern I am trying to match. Can a regular expression manage this?
Code:
(line 1) in_review assigned IN_peer_review IN_in_test resolved
(line 2) in_review assigned IN_peer_review IN_in_test resolved concluded
(line 3) in_review IN_design_assigned assigned IN_peer_review IN_in_test resolved
(line 4) in_review assigned IN_peer_review IN_in_test resolved
(line 5) entered assigned IN_peer_review IN_in_test assigned IN_peer_review IN_in_test assigned IN_peer_review IN_in_test resolved
(line 6) in_review assigned IN_in_test resolved
(line 7) in_review assigned IN_peer_review assigned IN_peer_review IN_in_test resolved
(line 8) in_review assigned IN_peer_review IN_in_test resolved
(line 9) assigned IN_peer_review IN_in_test resolved
What I need to get is the number of lines like line 5 above, where 'IN_peer_review' appears JUST ONCE before 'IN_in_test' appears TWO or more times. 'IN_peer_review' may appear several times after (i.e. to the right) of any appearance of 'IN_in_test'. These are of no consequence to me.
Thus,
....IN_peer_review.....IN_in_test.....IN_in_test.....
is the pattern I am trying to match. Can a regular expression manage this?