I tinkered with my previous code (Re: Check if key exist in hash but not exact match) and made a couple of improvements.
Name: Cola Match Key Value ----- --- ----- NO_CASE cola 1.25 PARTIAL Coca Cola 1.25 PARTIAL Pepsi Cola 1.25 PARTIAL Undead Cola <undefined>
As there are only a few code changes, and the sample run is the same as before except for the Name: Cola (shown above), I've put all of this in a spoiler (view at your leisure).
— Ken
In reply to Re^2: Check if key exist in hash but not exact match
by kcott
in thread Check if key exist in hash but not exact match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |