If I haven't fully misunderstood something, UDFs Regex & Javascript have two implementations of which the latter always overrides the first one. So effectively the first Regex UDF and the first Javascript UDF cannot be used.
Check here lines 210-11 & 215-216: