Finding the Regular Expression of a language I'm trying to find a regular expression for the language
$$L = \{w\mid n_a(w)+n_b(w)\equiv 2\pmod3\}\,,$$
where $n_a(w)$ is the number of $a$s in $w$.

I can see that this would generate strings of length $3n-1$ and
I can write the expression for a string of whose length is a multiple of three: $(( a + b )^3)^*$. But that's not quite what I need.

The alphabet is $\{a,b\}$
It's better to think of $L$ as strings of length $3n+2$. You already have an expression for strings whose length is a multiple of 3, so use that and append all strings of length 2.