/ string to integer m:(2 1 2 2 1 2 2 2 2) t:("-+";"0123456789") f:{. x@&1=m\(*&:)'x _in/:\:t} 1234~f"1234xxx" 123~f"-123" _n~f"+-234"