Regular Expressions – making one for it to have even amounts of b’s, I can only use symbols +, and *

I am not sure if I am correct?

It is not correct, because it only accepts inputs having b when they appear in adjacent pairs. You should allow those paired b characters to have zero or more a between them.

Also, you shouldn’t have a pattern sequence that repeats a* like a*a*, which is what happens when your outer group repeats, or the inner group is empty. This can lead to exponential execution times when you really implement that regular expression.

For instance, this represents the language:

a*(ba*ba*)*

There is not one unique answer to this. You could also do:

(a + ba*b)*

(where + is the “or” operator)

Read more here: Source link