# [Japt](https://github.com/ETHproductions/japt) v1.4.5, <s>61</s> <s>59</s> <s>92</s> <s>85</s> <s>84</s> <s>70</s> 68 bytes Assumes number inputs will always contain multiple digits. Outputs `0` for invalid string inputs. <pre><code> "OIREASGTBP" "%v"² Ñ?UsV eW,_ínuÃeWu _íuu:UnV *!Uè["[^{V}NU]"WWu]q|</code></pre> [Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.5&code=CiJPSVJFQVNHVEJQIgoiJXYisgrRP1VzViBlVyxf7W51w2VXdSBf7XV1OlVuViAqIVXoWyJbXntWfU5VXSJXV3VdcXw&input=Wwo1MTI0MzEgIlNJUkFORU5JIgo4MzQ2NzcwODEgIkJFTkFHVVRVVE9CSSIKMzE0MTU5MiAiRU5JTkFOSVNVUFVSIgoxMjM0NTY3ODkwICJJUkVOQVNVR1VUVUJVUE8iCjYxNjQ4MTcgIkdJR0FCSVQiCjQzMSAiQUVJIgpdLW1S) (Includes all test cases) --- - <s>2</s> 4 bytes saved thank to [obarakon](https://codegolf.stackexchange.com/users/61613/obarakon), who also convinced me to take this up again after I abandoned it earlier. I wish he hadn't! - <s>33</s> <s>26</s> <s>25</s> 23(!) bytes sacrificed to check input validity.