More concise match_input.