Yes, return is used to break out of .each, and yours is the approach I would take. Although, you could consider storing the regex in an array and use array methods. Not sure which one; every()? some() looks good
If you were to use a simple for loop to check the $('.number') elements then you would have the option to stop as soon as there is a non-match. I mean, to stop in a more orderly fashion (each is intended to examine each/every item).