Phase 5: Variable-length path patterns