I am trying to write a Cypher query to return the start and end nodes of all the patterns(subgraphs/paths) that are in the following regular expression:
Start node: A
End node: E
Relationship Types: B,C,D
The path will have different combinations of B or C and D (C followed by D).
I know we can use "*" for variable length paths (like B*1..5) and "|" for OR between the relationships (like, :C|:D for either C or D).
How can I match C and D both sequentially?
(I tried :C|:D and :C|D both gives a result for C OR D)
Is it possible to write Cypher query for patterns (Regular Expression) as I mentioned above?