Tidied up regex version