test.txt This is an example section. And the second line has structural science. jabb.mdb full | abb ------------- example | eg expand | exp section | sect science | sci test.out (required output) This is an eg sect. And the second line has structural sci.