Solution (source code)

= Solution

A <regular expression> is built from $\emptyset$, $\epsilon$, and alphabet symbols using union, concatenation, and Kleene star; its language is defined by applying the corresponding set operations recursively. A <deterministic finite automaton> is a tuple $(Q,\Sigma,\delta,q_0,F)$ and accepts
$$
L(D)=\{w:\widehat\delta(q_0,w)\in F\}.
$$
<Kleene theorem> says that the languages denoted by regular expressions are exactly those accepted by finite automata.

Regular languages are closed under finite union, using a product automaton or nondeterministic choice, and under finite intersection, using the product automaton with accepting set $F_L\times F_M$.

They are not closed under countable unions or intersections. Every language over a finite alphabet is a countable union of singleton languages, each regular, so a nonregular language such as $\{a^nb^n:n\geq0\}$ is a counterexample. It is also
$$
\bigcap_{w\notin L}(\Sigma^*\setminus\{w\}),
$$
a countable intersection of regular languages, giving the second counterexample.