I'm new to regular expressions and I'm currently working on some exercises to get familiar in constructing regular expressions for languages. I have the following languages, for which I already tried to write the corresponding regular expressions.
Could you please tell me if they are correct or what I could improve? I would really appreciate your help.
$L_1 = \{w \in \{a, b\}^* : |w| \text{ is divisible by 3}\}$
$r_1=((a+b)(a+b)(a+b))^*$
$L_2 = \{w \in \{a, b\}^* : w \text{ contains } aa \text{ or } bb\}$
$r_2=(a+b)^*aa(a+b)^*+(a+b)^*bb(a+b)^*$
$L_3 = \{w \in \{a, b\}^* : w \text{ contains } aa \text{ and } bb\}$
$r_3=(a+b)^*aa(a+b)^*bb(a+b)^*$
$L_4 = \{w \in \{a, b\}^* : w \text{ contains } ab \text{ and } ba\}$
$r_4=(a+b)^*ab(a+b)^*ba(a+b)^*+(a+b)^*ba(a+b)^*ab(a+b)^*$
$L_5 = \{w \in \{a, b\}^* : |w|_a \le 1 \text{ or } |w|_b \ge 2\}$
$r_5=(b^*+b^*ab^*)+a^*bbb^*a^*$
$L_6 = \{w \in \{a, b\}^* : |w|_a \le 1 \text{ and } |w|_b \ge 1\}$
$r_6=(b*+b*ab^*)(a*bb^*a^*)$