Test, validate and match regular expressions
This PCRE regex matches URLs (with optional http:// or https:// protocol and www. subdomain) that do NOT end with a trailing slash. It captures domain names with various TLDs (com or 2-6 letter extensions) followed by optional path/query strings, ensuring the final character is not a slash, pipe, or whitespace. Commonly used for URL validation and normalization tasks.