Suppose I have the following edge set:
edges = {N500122 -> N5003, N50012 -> N1099, N5003 -> N48059, N5003 -> N22007, N234544 -> N5001, N3010->N2111}
I'm looking for this result: N500122->N5003, N5003->N48059, N5003->N22007, N234544->N5001,
The result comes from looking only for a node with ONLY N5xxx; a total of 5 places, where N is always in first place position. For example, the edge N50012 -> N1099 would not be outputted since N50012 has six places. However, the edge N500122->N5003 would be outputted since to the right of the arrow the node N5003 meets the N5xxx requirement. The edge N3010->N2111 would not be outputted since neither side of the arrow has a node of the form N5xxx.
Any assistance would be most welcomed!