Grep/awk using a begin search pattern and end search pattern

I have this fileA

TEST FILE ABC
this file contains ABC;

TEST FILE DGHT this file contains DGHT;

TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;

I want to have a fileZ that has only (begin search pattern for will be "TEST FILE 123" and end search pattern will be ";")

TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;

Hello vbabz,

Welcome to UNIX and LINUX forums. Kindly use code tags for your samples shown in your post. In case your actual Input_file is same as shown sample then following may help you on same.

sed -n '/TEST FILE 123/,/;/p'  Input_file

Thanks,
R. Singh

Thank you