If you only need to test string, and don't need to capture text, the fastest way is:
$(?<!a) // 39 steps
This regex: $ puts cursor to the end of the string and then (?<!a) look (negative) behind.
Check it here https://regex101.com/r/VZ5Aqa/1
Compared with:
.*(?<!a)$ // 66 steps