Concatenate Strings with Context Strings with Context

For the purposes of this challenge, a string with context is a triple of strings, called the left context, the data part, and the right context. It represents a substring of a longer string. We use the vertical pipe | as a separator, so an example of a string with context is cod|e-go|lf, where the left context is cod, the data is e-go, and the right context is lf. This example represents the substring e-go of code-golf.

Now, to concatenate two strings with context, we proceed as follows, using aa|bcc|dee and cc|de|eee as examples. We align the strings as in the diagram

a a|b c c|d e e
      c c|d e|e e e


so that their data parts are adjacent. The data part of the concatenation is the concatenation of the data parts, in this case bccde. The left context is the part that extends the furthers to the left of the first data part, in this case aa. Similarly, the right context is eee, so the concatenation is the string with context aa|bccde|eee. For a second example, consider a|bb|cd and aabb|cd|, where the second word has a empty right context. The alignment diagram is

  a|b b|c d
a a b b|c d|


where the left context of the second word extends further than that of the first. The concatenation is aa|bbcd|.

But wait, there's a gotcha: if the letters of the alignment diagram don't match, the concatenation doesn't exist! As an example, the diagram of aa|bb|cc and c|c|c is

a a|b b|c c
      c|c|c


where the b and c on the fourth column disagree, so they cannot be concatenated.

The Task

Your job is to write a program that takes in two strings with context whose parts are separated by | as above, and outputs their concatenation if it exists, and something else if not. The "something else" can be any value, including no output, as long as it's not a valid string with context, and it is the same in all cases. However, throwing an error is not acceptable. You can give either a STDIN-to-STDOUT program or a function, and anonymous functions are accepted as well. The smallest byte count wins, and standard loopholes are disallowed.

Test Cases

aa|bcc|dee cc|de|eee -&gt; aa|bccde|eee
a|bb|cd    aabb|cd|  -&gt; aa|bbcd|
a|b|cccd   aab|cc|c  -&gt; aa|bcc|cd
a|b|c      b||cd     -&gt; a|b|cd
aa|bb|cc   c|c|c     -&gt; None
aaa|b|c    abb|cd|d  -&gt; None
|bb|cd     abb|c|ed  -&gt; None
a|b|c      a||cd     -&gt; None
Haskell, 184 182 201 199 155
s&amp;t|(a,'|':b)&lt;-f t,(x,'|':y)&lt;-f$r s,x#b,a#y=r(y!r a)++b!r x|0&lt;1=&quot;&quot;
r=reverse
a!b=a++drop(length a-1)b
(#)a=and.zipWith(==)(r a).filter h
f=span h
h=(/='|')

example run:
&quot;|a|&quot;&amp;&quot;|b|&quot; -- returns &quot;|ab|&quot;
&quot;|a|x&quot;&amp;&quot;|b|&quot; -- returns &quot;&quot;

if there isn't a match an empty string will be returned. otherwise the result would be returned.
partial explanation:
# is a function which gets two strings, and returns whether or not they match.
! gets two strings and returns the first one concatenated with extra character from the second (if there are any).
the main function &amp; uses span (/='|') to split the inputs into two parts, a|b|c to a, b|c, checks if the contexts match, and then uses ! twice to assemble the output.
Edit: mage-late regolfing seems to be pretty effective.