title: How to extract last occurrence of character in Perl?
body: <p>I am trying to extract a particular part of the string.</p>
  
  <p>Input String : <code>$str = /wave=1/sin2=1/sin1=2/sin0=3</code></p>
  
  <p>Output String : <code>$str = /wave=1/sin2=1/sin1=2</code></p>
  
  <p>Method 1 : </p>
  
  <p><code>@waveSplitArray = split /\//,$str;</code></p>
  
  <p><code>$lastOccuranceOfWave = pop @waveSplitArray;</code></p>
  
  <p>How to use regex to get the desired output?</p>