Is there a way to directly form a new regular expression when given two regular expressions and the desired operation (Union or Intersection).
$$ (a+b)^*aa(a+b)^*\cup (a+b)^*aa(a+b)^* $$
$$ (a+b)^*aa(a+b)^*\cap (a+b)^*aa(a+b)^* $$
Without building NFAs and doing the operation through them?
Thank you.