in reply to Re: Regular expression * vs +
in thread Regular expression * vs +
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 |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regular expression * vs +
by mwah (Hermit) on May 20, 2008 at 13:22 UTC |