I'm trying to write a regexp.
some background info: I am try to see if the REQUEST_URI of my website's URL contains another URL. like these:
I suggest using a simple approach, essentially building on what you said, just anything with a dot in it, but working with the forward slashes too. To capture everything and not miss unusual URLs. So something like:
It reads as:
Capturing the whole thing to the first grouping.
It would match, for example:
Verifying they are valid URLs is another story! It would also match:
It would not match:
The minimal match is basically
something.something, with no forward slash in it, unless it comes at least one character past the dot. So just be sure not to use that format for anything else.