note
mwah
<p>I think the OP struggled over the difference between</p>
<c>
...
my $txt='-UK 123 123-UK 123-UK 123-UK';
print "|$1| - match until pos:" . pos($txt) . "\n" while $txt=~/((?:\d+-UK\W?)+)/g ;
...
</c>
<p>and</p>
<c>
...
my $txt='-UK 123 123-UK 123-UK 123-UK';
print "|$1| - match until pos:" . pos($txt) . "\n" while $txt=~/((?:\d+-UK\W?)*)/g ;
...
</c>
<p>which is the difference between (expr)+ and (expr)*,
the latter matching everywhere <u>and</u> (of course) at 'expr', the former
matching <u>only</u> at 'expr'.</p>
<p>(maybe I misinterpreted his intention)</p>
<p>Regards</p>
<p>mwa</p>
687551
687587