We don't bite newbies here... much | |
PerlMonks |
Re^2: Combining multiple =~ s/by Corion (Patriarch) |
on Mar 07, 2021 at 19:10 UTC ( [id://11129292]=note: print w/replies, xml ) | Need Help?? |
You want to sort the words in the regular expression by descending length :) Or alternatively, use \b to match only whole words:
Otherwise, it could be that one matches before ones. Update: choroba spotted that the length($b) and length($a) were missing
In Section
Seekers of Perl Wisdom
|
|