What would the JS regex be for a directory "/m/" ("m" is the actual directory name) with or without a query string? No file name will ever show, only a possibility of query strings. Regex has to fail if another directory is present. This is the first level dir on a website which is the value returned by location.pathname. Examples:
Yes - /m/
Yes- /m/?a=b
No - /m/n/
No - /m/n/?a=b