good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Match similar words in file nameby choroba (Cardinal) |
on Apr 06, 2022 at 18:06 UTC ( [id://11142746]=note: print w/replies, xml ) | Need Help?? |
The common trick is to sort the words by length descending. The longer matches will then be tried first.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|