A pattern recognition-based approach for phylogenetic network construction with constrained recombination