cs50 / problems

Checks for check50
134 stars 227 forks source link

issue 257 fix #263

Closed patrickthornton closed 1 month ago

patrickthornton commented 1 month ago

it's a mouthful, but changing the ending regex from fr'^[^\d]*{escape(amount)}[^\d]*$' to fr'^([^\d](?<!\$None)(?<!\$nan))*{escape(amount)}([^\d](?<!\$None)(?<!\$nan))*$' catches the cases where extra numbers that don't look like numbers (i.e. $None and $nan) are printed

rongxin-liu commented 1 month ago

Looks good. Thank you!