$PreRead is a global variable whose value, if set, is applied to the text or box form of every input expression before it is fed to Mathematica.
$PreRead is always applied to each complete input string that will be fed to Mathematica.
In multiline input with a text-based interface, $PreRead is typically applied to the input so far whenever each line is terminated.
$PreRead is applied to all strings returned by a $SyntaxHandler function.
$PreRead is applied before InString[n] is assigned.
See The Mathematica Book: Section 2.13.1.
See also: $Pre, StringReplace, ToExpression.