#!/bin/bash
str="$(echo -e "abcde\n		fghij<FooBar>")";
echo "----- sed ------"
sed 'H;1h;$!d;x; s/\(.*\)><Foobar>/\1/' <<< "$str"
# Remove lines between two matching lines including them:
sed '/^start;/,/^end;/d' <<< "$(echo -e "Here:\nstart;more text\nText... here\nend; and\nEnd of string.")"
# Remove lines between two matching lines excluding them:
sed '/^start;/,/^end;/{{//!d;};}' <<< "$(echo -e "Here:\nstart;more text\nText... here\nend; and\nEnd of string.")"

echo "----- Perl ------"
perl -0pe 's/(.*)<FooBar>/$1/gs' <<< "$str"

echo "----- GNU grep ------"
grep -Poz '(?si)abc\K.*?(?=<Foobar>)' <<< "$str"