in reply to matching between 1 to 8 digits but not more

Note that a string with 9 digits also contains 8 digits. so you'll have to be more careful.

A good way to re-formulate the question is: does the string contain 1 to 8 digits that are neither followed nor preceded by digits?

When you ask it like that, it's easy to formulate as a regex:

m/(?<! \d ) \d{1,8} (?! \d )/x

For an explanation of the look-ahead and look-behind groups see perlre.

Perl 6 projects - links to (nearly) everything that is Perl 6.