Let's say I have this line of text:

aaa c b aa b ax

and I want to match all strings of a's not located between matched b's so in this case the matches would be {aaa, a}

I'm trying this regular expression but it doesn't work:
(?<!b.*)a+(?!.*b)

I'm trying to tell it to match all strings of a's except "those preceded by a b and followed by a b."

What this expression really says is match all strings of a's except "those preceded by a b OR followed by a b."

aaa - followed by a b

aa - preceded and followed by a b

a - preceded by a b

I'm wondering if there's a way to specify both 'not preceded by' and 'not followed by'