Quoted from Introduction to the Theory of Computation by Sipser, a regular expression is defined as:
Say that R is a regular expression if R is
- a for some a in the alphabet $\Sigma$,
- $\epsilon$,
- $\emptyset$,
- $(R_1 \cup R_2 )$, where $R_l$ and $R_2$ are regular expressions,
- $(R_1 \cdot R_2 )$, where $R_l$ and $R_2$ are regular expressions, or
- $(R_1^*)$, where $R_1$ is a regular expression.
In items 1 and 2, the regular expressions a and e represent the languages {a} and {$\epsilon$}, respectively. In item 3, the regular expression $\emptyset$ represents the empty language. In items 4, 5, and 6, the expressions represent the languages obtained by taking the union or concatenation of the languages $R_l$ and $R_2$ , or the star of the language $R_1$, respectively.
Reading the definition and Wikipedia's version, I was wondering if a regular expression is a string/word, or a set of strings, i.e., a formal language? Thanks!