Optimised regex