Packet classification is essential for routing, Quality of Service (QoS) provisioning, and policy-based firewall deployment. A packet classifier categorizes incoming packets into specific flows, aggregates, or service classes according to pre-defined rules. Previous works transform range-based fields into prefixes to simplify packet classification by deploying a single prefix-based matching scheme. However, range-to-prefix transformation enlarges rule databases thus resulting in huge memory consumption and inefficient searching performance. This paper suggests a two-stage packet classification algorithm to handle prefixes and ranges separately. A novel prefix-based matching scheme is also proposed. Experimental results indicate 95% reduction of storage space in comparison with the Hierarchical Trie (H-Tries), a typical prefix-based approach. Besides, the two-stage algorithm demonstrates efficient searching performance even when the rule database grows large.