Let D,G ⊂ ℂ be domains, let A ⊂ D, B ⊂ G be locally regular sets, and let X:= (D×B)∪(A×G). Assume that A is a Borel set. Let M be a proper analytic subset of an open neighborhood of X. Then there exists a pure 1-dimensional analytic subset M̂ of the envelope of holomorphy X̂ of X such that any function separately holomorphic on X∖M extends to a holomorphic function on X̂ ∖M̂. The result generalizes special cases which were studied in [Ökt 1998], [Ökt 1999], and [Sic 2000].