I want a regex expression which only match extensionless url. In otherwords if an extension is present in url then completely ignore it.
/(.+)/(.+) this will match an URL both with and without extension.
http://www.site.com/sports/cricket should match
http://www.site.com/sports/cricket.aspx shouldn’t match
Thanks in advance
The following will only match strings which have at least two
/(per your example regex), and don’t have a.anywhere after the last/:I’d recommend http://www.regular-expressions.info/ if you want to learn more about regexs.