title: regex matching urls that contain string in relative path not in domain
body: <p>This is one of my interview questions. I didn't come up with a good enough solution and got rejected.</p>
  
  <p>The question was </p>
  
  <pre><code>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://www.glassdoor.com/job/ABC
      - https://glassdoor.com/job/
      - HTTPs://job.com/test
      - Www.glassdoor.com/foo/bar/joBs
      - http://192.168.1.1/ABC/job
      - http://bankers.jobs/ABC/job
  </code></pre>
  
  <p>My solution was using <code>lookahead</code> and <code>lookbehind</code>, <strong><code>/(?&lt;!\.)job(?!\.)/i</code></strong>. This works fine in above lists. However, if the url is <code>HTTPs://jobs.com/test</code>, it will not work.</p>
  
  <p>I am wondering what is the correct answer for this question. Thanks in advance for any suggestions!</p>