Extract left bracket detection logic out.
Extract searchToken function out.