Build, test, and debug regular expressions
Matches relative document paths in href attributes—capturing everything after href="/ up to (but not including) a .doc or .pdf file extension—or captures the base URL from src attributes that start with http/https and end just before a /v2/ or /userfiles/ path segment. Typically used in HTML parsing, web scraping, or link-rewriting scripts to extract document URIs and service base URLs. Relies on lookbehinds and lookaheads so surrounding attribute quotes, extensions, and path prefixes are not consumed by the match.