The task
Given a multiline string with ascii art operators and numbers, parse the expression!
Possible symbols
Numbers: (3x4)
/
/|
|
---
___
_|
|
---
___
_|
|
---
| |
|_|
|
|
___
|_
|
---
___
|_
| |
---
___
/
/
|
___
|_|
| |
---
___
|_|
|
---
___
| |
| |
---
Operators: (3x3)
|
-+-
|
---
\ /
x
/ \
.
---
.
Braces: (1x4)
/
|
|
\
\
|
|
/
Input
A multiline string with ascii art operators and numbers. Examples in the test cases.
Output
The string of the parsed expression.
Test cases
Input:
/ ___ ___ \ ___
| _| | / | . _|
| | -+- / | --- |
\ --- | | / . ---
Output: (2+7)/3
Input:
___ / ___
|_| /| \ / |_
| --- | x |
--- --- / \ ---
Output: 9-1*5
Rules
- Numbers will always be single-digit
- Since operators are one symbol shorter than numbers, they are placed one symbol lower than numbers, leaving whitespace on top.
- All symbols have a column of whitespace between them
- This is a code-golf challenge, so lowest byte count wins!