I have a file containing strings like 

```
xxxbbxxxbxbx
xxxbxxxxbxxx
xxbxxxbxxbxx
bbbbxxxxxxxx
bxxxxxxxxxxx
xxxxbxxxxxxx
xxxxbbxxbbxx
xxxxbbbbxxxx
xxxxbbbbbxxx

```

In reality the file `x` is really a variety of uninteresting alphabetical characters. I want to use grep to print out all the lines where `b` occurs *exactly* four times. 

If I use `grep -e "[^b]b[^b]\{0,4\}b[^b]\{0,4\}b[^b]\{0,4\}b[^b]\{1,4\}" test.txt` it excludes the last line (I want), but also excludes line 4 (I don't want) where the line starts with `b`.

If I use `grep -e "b[^b]\{0,4\}b[^b]\{0,4\}b[^b]\{0,4\}b[^b]\{1,4\}" test.txt`, it catches line 4 (I want) but also the last line (I don't want).