Replace whitespace search string with a constant and local variable for charater in the currentposition