Macro to extend to next/prev region start/end

Hey forums,

I’ve been trying to make this for ages (goes back to the old forum days).
I think this would be really useful, does anybody know how we could achieve this with a macro?