Regular Expression to match pattern once or more with no partial matches
===

Better explained with examples:

1) **HHH**
2) **HHHH**
3) **HHHBBHHH**
4) **HHHBH**
5) **BB**

I need to come up with a regexp that matches only 3 H's or a multiple of 3 H's (so 6,9,12.. H's are ok as well) and 5 H's are **not** ok. And if possible I don't want to use Perl regexps.

so for the input above the regexp would match 1) and 3) only.
I'm just starting with regular expressions here so I don't exactly know how I'm supposed to approach this.

Thanks!