eg: there is a url as this:
i want to make a match that the second part in the url are beginning of test. then do something.
eg: if the url is [IANA — Example domains or [url=http://example.com/test/...then]IANA — Example domains](http://example.com/test/)....
The standard location object contains that information, so location.pathname will be the path part of what you want.