Evaluating the score based from a chess FEN string Challenge

Forsyth–Edwards Notation (FEN) is a standard notation for describing a particular board position of a chess game. Your challenge is to evaluate the score using the FEN string. This is an example of a FEN string:

5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8


Using this string, you can calculate the material score for each color with the following score table:


  
  p / P = Pawn = 1 point
  n / N = Knight = 3 points
  b / B = Bishop = 3 points
  r / R = Rook = 5 points
  q / Q = Queen = 9 points
  k / K = King, these don't have any points because every legal position contains a king for each side
  


White pieces are designated using upper-case letters ("PNBRQK") while black pieces use lowercase ("pnbrqk"). Empty squares are noted using digits 1 through 8 (the number of empty squares), and "/" separates ranks.

From the example FEN string, we can calculate the material scores for each side:

For black:


  5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8
  
  All the black pieces left: p + p + p + p + r, this is a total of 9


For white: 


  5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8
  
  All the white pieces left: P + R + P + N + P + P + P, this is a total of 13


The final score is determined with the following formula: White score - Black score = Final score, so for the example the final score would be: 13 - 9 = 4

Example :

Input:

5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8


Output:

4




All code-golf rules apply here, the solution with the least amount of bytes wins.



How to post

# Language Name, N bytes

 [code]

 [explaination, etc.]
>&lt;>, 64 57 56 53 bytes

"QRBNP"013359v
$0p4}:{:v?=1l&lt;p4+' '{-
g4v?(0:i&lt;+
n~&lt;;


(-7 bytes with some inspiration from @El'endiaStarman's answer, -3 bytes thanks to @randomra)

Explanation

The program uses the codebox as a lookup table. Out-of-range puts/gets don't work with the online interpreter, so this only works with the official Python interpreter.

The first line pushes the pieces, followed by the piece values. It also pushes an initial 0 to kick off the total for the third line.

The second line then puts the appropriate positive or negative value at the corresponding piece cell, e.g. -1 is placed at ('p', 4) and 1 is placed ('P', 4). The length of the stack is checked to make sure the loop runs 5 times.

After the loop is over, the stack consists of our single zero from the first line. For each char we perform a lookup at the corresponding cell in the table and add it to our total. By default, uninitialised cell values are 0, which is perfect for our purposes.

The last line merely prints the result.