Read a retro display Art stolen from What size is the digit?



7-segment digits can be represented in ASCII using _| characters. Here are the digits 0-9:

 _     _  _       _   _  _   _   _ 
| | |  _| _| |_| |_  |_   | |_| |_|
|_| | |_  _|   |  _| |_|  | |_|  _|


Your job is to parse the art into normal numbers.

Notes on numbers


Each digit has a different width.


1 has a width of 1
3 and 7 are 2 wide
245689 and 0 are all 3 wide



Also between each digit is one char of padding. Here is the full char set:


 // &lt;-- should be one space, but SE formatting messed it up
|
|
-------------
 _ 
 _|
|_ 
-------------
_ 
_|
_|
-------------

|_|
  |
-------------
 _ 
|_ 
 _|
-------------
 _ 
|_ 
|_|
-------------
_ 
 |
 |
-------------
 _ 
|_|
|_|
-------------
 _ 
|_|
 _|
-------------
 _ 
| |
|_|


Input

Input can be either from the console or as a string arg to a function.

Output

Output is either put to the console or is returned from the function.

Examples:

  _  _   _ 
|  |  | |_ 
|  |  | |_|
1776

 _   _     _ 
 _| | | | |_ 
|_  |_| | |_|
2016

   _       _ 
| |_| |_| |_ 
|  _|   |  _|
1945

   _   _   _   _   _   _ 
| | | | | | | | | | | | |
| |_| |_| |_| |_| |_| |_|
1000000

 _     _  _       _   _  _   _   _ 
| | |  _| _| |_| |_  |_   | |_| |_|
|_| | |_  _|   |  _| |_|  | |_|  _|
0123456789


This is code-golf so shortest byte count wins!
Ruby, 184 bytes

a=0
l=$&lt;.map{|x|x.bytes.map{|y|y==32?0:1}+[0]*2}
(0..l[0].count-1).map{|i|l[0][i]+2*l[1][i]+4*l[2][i]}.each{|x|
x&gt;0?(a=x+2*a):(p Hash[[40,6,32,20,18,26,42,8,44,64].zip(0..9)][a];a=0)}


Explanation


takes the input from stdin
converts the strings to binary sequences, 1/0 for segment on/off
encodes columns to 3bit binary number
encodes sequences of 3 bit numbers to 9 bit numbers, use '0' columns as stop symbols
use a lookup table to convert the 9 bit numbers to digits


This is my first code-golf. Thanks for the fun!