automating query length classification using regex