Used regex for comparison of quitting case