p =re.compile(r'(TAG|CORE)START(?: B)?(.+?)(\1END(?: B)?)',re.DOTALL)
test_str ="intro intro intro intro intro intro\nBEGIN A This is where some text starts\nThat is not interesting or wanted\nCORESTART save text A save text A save text A save text A \nsave text A save text A save text A save text A save text A \nsave text A COREEND\nThis is an addendum that is not needed but is just in the way\nEND A outro outro outro outro outro outro \noutro outro outro outro outro outro outro \n.\n\nintro intro intro intro intro intro\nINIT B This is where some text starts\nThat is not interesting or wanted\nTAGSTART B save text B save text B save text B save text B \nsave text B save text B save text B save text B save text B \nsave text B TAGEND B\nThis is an addendum that is not needed but is just in the way\nTERM B outro outro outro outro outro outro \noutro outro outro outro outro outro outro "
[' save text A save text A save text A save text A \nsave text A save text A save text A save text A save text A \nsave text A ', ' save text B save text B save text B save text B \nsave text B save text B save text B save text B save text B \nsave text B ']