title: Regular expression to match url and ignore querystring
body: <p>I have migrated my old asp.net  website to wordpress and i now am trying  to do 301 redirect gracefully .
  I am trying to do it by using regular  expression with <a href="https://urbangiraffe.com/plugins/redirection/" rel="nofollow noreferrer">this</a> plugin.</p>
  
  <p>My source url is </p>
  
  <pre><code>http://example.com/outlets/19-awok?page=2
  </code></pre>
  
  <p>Target url is <code>http://example.com/shop/awok/</code></p>
  
  <p>I want to get the shop name and ignore everything else coming after it</p>
  
  <p>My try : </p>
  
  <pre><code>/outlets/(\d+)-(.*)? =&gt; /shop/$2
  </code></pre>
  
  <p>Another example source  url   <a href="http://example.com/outlets/105-big-bazar?page=453" rel="nofollow noreferrer">http://example.com/outlets/105-big-bazar?page=453</a></p>