order operators by prefix and longest first