Build, test, and debug regular expressions
Parses Kubernetes scrape annotation values (e.g. metrics.agent.grafana.com/path or prometheus.io/path) that may bundle multiple settings separated by semicolons and commas. Group 1 captures a leading prefix, group 2 matches the separator—including cases where the same prefix recurs followed by '=' via the \1 backreference—group 3 extracts the path/port value, and group 4 optionally captures trailing ',port=...' K/V options. Used in Prometheus/Grafana Agent discovery to support per-port scrape paths.