cs50 / problems

Checks for check50
145 stars 237 forks source link

issue 257 fix #263

Closed patrickthornton closed 4 months ago

patrickthornton commented 4 months 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 4 months ago

Looks good. Thank you!