title: perl regex to get trailing numbers
body: <p>I'm trying to basically trying to separate a specific amount of text from the one or more numbers that appear at the end. The below works when there is 1 trailing number but not when there is two or more? Shouldn't the (\d+) be getting the "12" in "P_TIME12"?</p>
  
  <pre><code>my @strs = ('P_ABC1','P_DFRES3','P_TIME12');
  foreach my $str (@strs) {
          if ($str =~ /^P_(\w+)(\d+)$/) {
                  print "word " . $1 . " digits " . $2 . "\n";
          }
  }
  </code></pre>
  
  <p>Results in</p>
  
  <pre><code>word ABC digits 1
  word DFRES digits 3
  word TIME1 digits 2
  </code></pre>
  
  <p>TIA</p>