fionbarr has asked for the wisdom of the Perl Monks concerning the following question:
I only want the xyzxyzxyz stuff but I keep gettingmy $str = 'xyzxyzxyz - Prod Cache Broker - 16100'; print "$str\n$1\n" if ($str =~ m/^(.+)\s+?.+$/);
xyzxyzxyz - Prod Cache Broker -
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: minimal matching regex
by davido (Cardinal) on Feb 10, 2015 at 21:37 UTC | |
|
Re: minimal matching regex
by Corion (Patriarch) on Feb 10, 2015 at 21:36 UTC | |
|
Re: minimal matching regex
by Laurent_R (Canon) on Feb 10, 2015 at 22:32 UTC | |
|
Re: minimal matching regex
by AnomalousMonk (Archbishop) on Feb 10, 2015 at 22:11 UTC |