im learning theoretical computer science regular expressions
i need to find regular expressions for
language in $\sum {0,1,2,3 }$
a.) language with at most one 1 and at most one 2
$(0+3)^{*}1(0+3)^{*}2(0+3)^{*}+(0+3)^{*}2(0+3)^{*}1(0+3)^{*}+(0+3)^{*}1(0+3)^{*}+(0+3)^{*}2(0+3)^{*}+1^{*}$
or
$1^{*}(0^{+} + 2^{+} +3^{+}+ \epsilon)1^{*}(0^{+} + 2^{+} + 3^{+}\epsilon)1^{*}$
im not sure which one is right
b.) language that not end in 12
$(0+1+2)^{*}((0+2)(0+1+2)+1(0+1))$
is this correct?
Ad a) $(0+3)∗1(0+3)∗2(0+3)∗+(0+3)∗2(0+3)∗1(0+3)∗+(0+3)∗1(0+3)∗+(0+3)∗2(0+3)∗+1∗$. The last expression $1*$ should be replaced by $(0+3)*$.