&redirect_uri=the literal text &redirect_uri= (case sensitive) \S+?any non-whitespace character, repeated at least once
localhostthe literal text localhost (case sensitive) \Kresets the starting point of the reported match. Any previously consumed characters are no longer included in the final match
%the literal % (3710 / 458 / 2516)
Negated Character Class[^%]+ +matches at least one character outside the set below:
%the literal % (3710 / 458 / 2516)
g modifier: global. Finds all matches instead of stopping after the first