Help for this page
grep /$string1.*$string2|$string2.*$string1/,
grep / ^ ... ($s2 < $e1) && ($e2 > $s1) })(?=A)(?!A)) /x,