Bound states in the continuum (BICs) and long-lived resonances have become a unique way to produce the extreme localization of light waves. In this paper, we present a theoretical demonstration of BICs and long-lived resonances in photonic comblike structures with two semi-infinite leads, together with their existence conditions. The comb structure is composed of connected guides of length L. The BICs correspond to localized resonances of infinite lifetime inside the comb, without any leakage into the surrounding leads. When BICs exist within state continua, they induce long-lived resonances for specific values of some modified lengths of the guides constituting the comb structure. This enables to regulate these resonances by means of these lengths. The obtained results take due account of the state number conservation between the final system and the reference one constituted by the independent comb and semi-infinite leads. This conservation rule enables to find all the states of the final system and among them the bound in continuum ones. In addition, we present a comb structure with highly directional outputs through two different lines. In each output line two different long-lived resonances enable to transmit two different signals. This system enables to demultiplex two different signals through each of two output lines. The analytical results are obtained by means of the Green's function technique. The structures and the long-lived resonances presented in this paper may have potential applications due to their high sensitivities to weak perturbations, in particular in filtering, sensing, and communication technology improvements.