This is one of my interviews. I did not come up with a good enough solution and was refused.
The question was
What is the one regex to match all urls that contain job(case insensitive) in the relative
path(not domain) in the following list:
- http:
- https:
- HTTPs:
- Www.glassdoor.com/foo/bar/joBs
- http:
- http:
My decision to use lookaheadand lookbehind, . This works well in the above lists. However, if the URL is , it will not work. /(?<!\.)job(?!\.)/iHTTPs://jobs.com/test
I am wondering what is the correct answer to this question. Thanks in advance for any suggestions!
source
share