Head-body partitioned string matching for Deep Packet Inspection with scalable and attack-resilient performance