title: Regx to find the string staring with word and ending either with ?/end of line but not containing a specific word
body: <p>Regx to find the string staring with word and ending either with ?/end of line but not containing a specific word</p>
  
  <p>For e.g., I have following URL with different format and want to capture specific part (Page Identifier )</p>
  
  <pre><code>Home: https://www.example.com/course/home#/
  
  courseSummary: https://www.example.com/tag/mypage/course/#/courseSummary?courseName=abc&amp;courceTitle=MyTitle
  
  grounddetails : https://www.example.com/tag/mypage/course/#/options/grounddetails
  
  Certification : https://www.example.com/tag/mypage/course/#/options/Certification/segment
  
  customer: https://www.example.com/tag/mypage/course/#/checkout/customer
  </code></pre>
  
  <p>But whenever the 'confirmation' word contain in URL then it SHOULD NOT match.</p>
  
  <pre><code>https://www.example.com/tag/mypage/course/#/**confirmation**?success=true
  </code></pre>
  
  <p>Could you please help to compose the regex for it</p>