From your example above, it I guess you would like it to be (\d+)([\s\S]*?)(\d+) adding "+" to mark that it is multiple digits.
However, in regards of your issue, from how I understand your request, you could solve it by adding an optional line break at the beginning?
([\r\n]?\d+)([\s\S]*?)(\d+)...