I have an issue with lazy quantifiers. Or most likely I misunderstand how I am supposed to use them.
Testing on Regex101
My test string is let\'s say: 12345678
If you have a string containing numbers followed by a non-numeric, the minimum set of {1,5}? would always be 1 (so it's not necessary to have the range.) I don't think the lazy operator is actually working as we think on the numeric range.
If you make the first \d+ greedy, as below you'll get the minimum number of digits before the D.
(\d+)(\d{1,5}D)
Matches 9D in the second group
If you make the first set of numbers lazy, then you'll get the maximum number of digits (5)
(\d+?)(\d{1,5}D)
Matches 56789D in the second group
I think these regex expressions might be more in line with what you need.