How to make the bot understand that user is re-entering the previous input as he might have did a mistake in entering the input

How to make the bot understand that user is re-entering the previous input as he might have did a mistake in entering the input