我必须匹配我需要与urls
匹配的大量relative paths
以及regex
,这可能会以其确切的格式变化很大,但基本上会如下所示:
http://example.com/asbd
http://example.com/products/asdb
http://example.com/
/Products/product.aspx
/Products/random/articles.aspx
/Products/product
/Products/random/articles
到目前为止,我有以下内容:
http://(?:www\.| )*example\.com(?:/|)[A-Za-z0-9](.*)$
匹配
http://example.com/asbd
正则表达式与 subdomain urls
不匹配非常重要,如下所示:
http://careers.example.com/
http://investor.example.com/asdf
http://newsroom.example.com/