Don't use a regex, or don;t use a regex alone.
They aren't good at "numeric ranges" - they are a text processing system.
So use a regex to break up the input:
^(?<prefix>\d{3})(?<year>\d{4})(?<uid>\d{6})$</uid></year></prefix>
And then use the three named groups to verify the actual content. It's more flexible, and a lot easier to understand (and make work next year as well...)