This question is really really tough for me. It asks to write a regular expression for the following language (with the given alphabet of $\{a,b\}$: $$L=\{w:w\text{ has even length and has an odd number of b's}\}$$ I tried to write something, but I don't know how to deal with even length and odd number of b's both at the same time.
It's a random question that our professor gave us as an example to be prepared for the quiz. There is not any source for this question.
Words in $L$ can be divided into length-$2$ blocks, an odd number of which are $ab$ or $ba$ (for they change the parity of the $b$ count and $aa,bb$ don't). Letting $X=(aa|bb)^*$ and $Y=(ab|ba)$, a regular expression for $L$ is $X(YXYX)^*YX$.