ssc37 has asked for the wisdom of the Perl Monks concerning the following question:
perl -e ' my $string = "an apple in the fridge"; $string =~ /(apple in the fridge|an apple)/; print $1 . "\n"; ' an apple
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex Match : Doesn't return the longest match when there's a common word present in the group
by choroba (Cardinal) on Feb 01, 2015 at 17:27 UTC | |
by ssc37 (Acolyte) on Feb 01, 2015 at 18:47 UTC | |
|
Re: Regex Match : Doesn't return the longest match when there's a common word present in the group
by LanX (Saint) on Feb 01, 2015 at 17:41 UTC | |
|
Re: Regex Match : Doesn't return the longest match when there's a common word present in the group
by QM (Parson) on Feb 03, 2015 at 10:41 UTC |