title: How to rewrite rules with nginx regular expressions
body: <p>using nginx( version >1 ) rewrite
  I would like to rewrite</p>
  
  <p>www.domain.com/local/airports/jfk-2/
  as
  www.domain.com/local/airports/jfk/</p>
  
  <p>There are too many locations like above.</p>
  
  <p>I tried below without luck
  rewrite ^/local/airports/(.*)/ /local/airports/$1-2/ permanent;</p>
  
  <p>What is the best way to get this work?
  Thanks</p>