Eventually could be written as a single regex