In addition to moritz' hint, you could look into the matching process by issuing (e.g.):
... my $txt = '-UK 123 123-UK 123-UK 123-UK'; print "|$1|\n" while $txt =~ /((?:\d+-UK\W?)*)/g; ...
Regards
mwa
In reply to Re: Regular expression * vs +
by mwah
in thread Regular expression * vs +
by b_e_n_82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |