Close, but not sure OP wants this (from mwah's example):
687551.pl syntax OK perl 687551.pl || || || || || || || || |123-UK 123-UK 123-UK| ||
Whereas:
my $txt = '-UK 123 123-UK 123-UK 123-UK abc-oops!'; print "|$1|\n" while $txt =~ /((?:\d+-UK\s))/g;
produces
perl 687551.pl |123-UK | |123-UK | |123-UK |
In reply to Re^2: Regular expression * vs +
by ww
in thread Regular expression * vs +
by b_e_n_82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |