I'm trying to match extension-less url with or without query parameter.
So far .+\/[^.\/]*$
matches some of them but it fails when .
is present in query parameters
For example what i want is
http://www.example.com/ -> MATCH
http://www.example.com/abc -> MATCH
http://www.example.com/abc/def/ -> MATCH
http://www.example.com/abc/def.ext/ -> MATCH
http://www.example.com/abc?param=abc.def -> MATCH
http://www.anything.com/abc/def.ext/?param=abc.ext -> MATCH
http://www.example.com/abc.ext -> DONT MATCH
http://www.example.com/abc/def.ext -> DONT MATCH
http://www.anything.com/abc/def.ext?param=abc -> DONT MATCH
http://www.anything.com/abc/def.ext?param=abc.def -> DONT MATCH
The answers provided in How to match only extensionless URLs? fails when .
or /
are present in query parameters key or value. I've tried with many patterns but couldn't get desired result.
I am noob in regex. Please help.