@DavidKButlerUoA @zithral I have seen that somewhere, but can't think where!
When/if you come back to this, one thing that helped me learn was looking at railroad diagrams, showing the paths a regular expression can take. debuggex.com seems to produce a nice display