In this paper, a novel header extraction scheme based on semiconductor ring laser is proposed and simulated for proof of principle. This scheme is to be used in all-optical packet switching network which can extract return-to-zero (RZ) format modulation data packet with variable header/payload length and intensive spacing. Simulations and numerical analysis for a 3-byte header and 128-byte payload show that this structure can extract the headers with more than 20 dB contrast ratio. Additionally, the structure simplicity and its small size is proper candida to integration in all-optical circuits.