Hi, For following: aaa model 0 bbb acb model 1 ccc How can I set regexp1 as "model 0" and end "model 1" so the final print out will be: model 0 bbb acb above is a very simple example, Thanks for any advice, Best,