how to cut a string between two strings in unix using sed : Can you please help the below scenario.

I have a file = ABDC.DELTA00.TS.D20161022.TS_BAR99.DAT.DOCC

i want to cut the text between two strings : 1st TS and DOCC.

efvar4=$(echo $filename | sed -n "s/.*TS//;s/DOCC.*//p")

Result = _EOR99.DAT - Here it is matching 2nd TS in the filename.

Desired result : .TS.D20161022.TS_BAR99.DAT.

How to modify my sed command to acheive my result.
