We cannot simply append (or prepend) the desired character to a precomputed regular expression because the resulting expression may not be unambiguous or may represent the a different language.
to tackle this problem, we first define the language F(w) to be the set of strings that end in the first occurrence of w. F(w) = {x | w appears only as a suffix of x}.