For Perl regexes, its seems rosy until you reach
look-aheads. /^(?=$rx1)$rx2/ needs to find the
intersection between the two languages defined
but $rx1 and $rx2, if it exists. Without the ^
anchor $rx1 is floating in $rx2, it becomes
substring instead of intersection.
It may be solvable, but not by me.