Trimming the userinput for matching