title: perl regex escape characters
body: <p>I have heard perl is a good language at doing regex but i am a bit confused at the characters that requires escaping</p>
  
  <p>I tested the code on <a href="http://regexlib.com/RETester.aspx" rel="noreferrer">http://regexlib.com/RETester.aspx</a> and got the result I want</p>
  
  <pre><code>//home/dev/abc/code/hello/world.cpp#1
  //home/dev/((.*?)/[^/]+).*#
  
  Match   $1  $2
  //home/dev/abc/code/hello/world.cpp#    abc/code    abc
  </code></pre>
  
  <p>However, I am not quite sure how do i translate this to perl code</p>
  
  <p>I tried,</p>
  
  <pre><code>\/\/home\/dev\/\(\(\.\*\?\)\/\[\^\/\]\+\)\.\*\#
  </code></pre>
  
  <p>and</p>
  
  <pre><code>\/\/home\/dev\/((.*?)\/[^\/]+).*\#
  </code></pre>
  
  <p>and both failed</p>
  
  <p>Don't you think the escaping makes the regex very unreadable? Am i using something wrong?</p>