|The stupid question is the question not asked|
Challenge: Generate a glob patterns from a word listby choroba (Archbishop)
|on May 03, 2021 at 22:41 UTC||Need Help??|
choroba has asked for the wisdom of the Perl Monks concerning the following question:
(Inspired by this StackOverflow question.)
You are given a list of words. Find the shortest glob expression generating the words in the list. The glob expression should only use curly brackets and commas, no spaces, no wildcards.
I've tried several times, but I can't get it right. It gets much more complex than it seems, or maybe I'm doing something wrong. Any ideas, solutions, insults?
Update: What do I mean by "shortest"? The curly brackets and commas don't count, just count the other characters.