Whoops forgot to replace some redundant code related to regex