Removed a redundant regex comparison