In this paper, a novel header extraction scheme based on a semiconductor ring laser is proposed and simulated for the proof of principle. This scheme is to be used in all-optical packet switching networks which can extract return-to-zero (RZ) modulation data packets 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 headers with more than a 20 dB contrast ratio. Additionally, the structure's simplicity and its small size makes it a proper candidate for integration with other all-optical circuits.