1
2レベル下の.htmlで終わるページのみを照合する必要があります。2レベルの深いページでのみ一致する
試合
http://www.example.com/bedroom/beds/select-queen-platform-bed.html
ので基本的にはdomain-name.com/level-1/level-2/page-name.html
一致している必要があります
http://www.example.com/bedroom/select-queen-platform-bed.html
http://www.example.com/bedroom/
http://www.example.com/
http://www.example.com/bedroom/beds/level3/select-queen-platform-bed.html
と一致しません私は今、これらの可能性のいくつかに一致していません。私は何を使うべきですか?
現在の正規表現
/*/.*html$
てみてください[ '/^HTTPS:?\/\ /(?:[^ \ /] + \/){3} [^ \ /。] + \。html $ /。test(url) '](https://regex101.com/r/Bhk3bS/1) –