I want to match repeat character(/) only once in the middle of the string. At the start it must be http://www.website/shop. Now I am using this code and it matches all html. How can I restrict it.
'^[http://www.website/shop/].*.html$'
With this regex, no result ^[http://]\W*(/){2}\W
Valid
http://www.website/shop/men.html
http://www.website/shop/women.html
Invalid
http://www.website/shop/men/footwear.html
http://www.website/shop/men/causal.html
http://www.website/shop/women/footwear.html
\Wis opposite of\w, i.e. it's any character except letters and numbers...