Oriel Jutty :hhHHHAAAH: on Nostr: A regex always finds the leftmost match. Your first regex, [0-9]*, can match at ...
A regex always finds the leftmost match. Your first regex, [0-9]*, can match at offset 0 in >335 because * means "0 or more of the preceding thing", so it can match all 0 digits before >. On the other hand, [0-9]{1,3} requires at least one digit to match, so the first location where it can succeed is at offset 1, matching all three available digits.