Build, test, and debug regular expressions
This PCRE regular expression matches specific legacy or old category URLs, typically starting with an optional /dhtml/ directory. It is designed to capture two distinct URL formats: dynamic PHP pages (/home.php?id=123) and static-looking HTML pages (/page-some-category-456.html). The pattern successfully extracts the numeric category identifiers from both URL structures into separate capturing groups. It is highly useful for routing legacy traffic, redirecting old links, or updating database records during a site migration.