How to join several (javascript) regular expressions into a single one?
For example, given [/^abcd$/,/^abxy$/,/^abz$/] the output will be /^ab(cd|xy|z)$/.
[/^abcd$/,/^abxy$/,/^abz$/]
/^ab(cd|xy|z)$/
Is it even computationally possible?