Talking about Regular Expressions, three things come to mind:
- The matching domain
- Complexity
- Speed
Simplicity of any Regular Expressions to match desired strings has a direct relationship with its speed so using less expressions you'll have better speed in searching through whole text.
Some expressions really cost a lot so when trying to select the best choice of your regex why should you think more?!
On the regex ^a{3}$
the engine will say: I really mean it! It's straight forward, simple with one obvious matching domain.
However in second one (?=^a{3}$).*
engine doesn't mean it. It has probably so many matching cases, it has a positive lookahead and consume more resources.
Now, which one you're goin' to love?