Retina , 25 bytes
Retina , (削除) 25 (削除ここまで) 20 bytes
+`^.*(.).*¶(?=.*1円)
2ドル
^.+$
That'sWhenever we find a fairly disappointing score, but I'm having trouble coming up with something better. The idea isdigit that also occurs in the next number, we repeatedly remove the first number if it shares a digitseparator between those numbers (along with the seconddigits in the former number, starting from the shared one, but that's irrelevant). AtThe input is valid, if all separators have been remove in the endprocess, which we check by making sure that there is only one number leftthe string can be matched as a single line.
Retina , 25 bytes
+`^.*(.).*¶(.*1円)
2ドル
^.+$
That's a fairly disappointing score, but I'm having trouble coming up with something better. The idea is that we repeatedly remove the first number if it shares a digit with the second number. At the end we check that there is only one number left.
Retina , (削除) 25 (削除ここまで) 20 bytes
(.).*¶(?=.*1円)
^.+$
Whenever we find a digit that also occurs in the next number, we remove the separator between those numbers (along with the digits in the former number, starting from the shared one, but that's irrelevant). The input is valid, if all separators have been remove in the process, which we check by making sure that the string can be matched as a single line.
Retina, 25 bytes
+`^.*(.).*¶(.*1円)
2ドル
^.+$
That's a fairly disappointing score, but I'm having trouble coming up with something better. The idea is that we repeatedly remove the first number if it shares a digit with the second number. At the end we check that there is only one number left.