Q: Regex - start with "a" and involve one or more "b"s I'm trying to create a regular expression that finds strings that starts with an a and has one or more b(s) anywhere else in the string.
I know I have to start with '^a but I'm lost after that on how to get it to find b's anywhere else after that. I think the closest I got was '^a.+.b+$' which I randomly tried to see if it worked, but of course, it isn't right.

A: It's even a bit simpler:
^a.*b

You start with an a, follow it with 0 or more arbitrary characters, then a b. If all you want is at least 1 b, you don't need to explicitly match anything after you find the first b.
Your regular expression requires a string that


*

*Starts with a,

*followed by 1 or more arbitrary characters,

*followed by another arbitrary character,

*and ends with a string of 1 or more bs.


Note this precludes strings like


*

*ab, which is shorter than the minimum length of 4 required by your regex.

*abasbbc, which doesn't end with b

A: Complementing chepner answer, if you want to find two b that are not necessary together, then you can use:
^a.*b.*b

If you want to find two b that must be separated, you can use:
^a.*b[^b]+b

Also, if you want to find two b like bb after a, then you can use 
^a.*bb

And, if you want to find at least one b, then you can use:
^a.*b+

By the way, above regex will match start of sentence, if you want to match the whole sentence you can add .* at the end of the pattern, like:
^a.*b+.*

