Your question is Regex Word Search. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Docusign may need to match user-entered patterns against words used in template names or document metadata. Given a dictionary of words and a pattern, determine whether at least one complete word matches the pattern.
The pattern supports:
., which matches any single lowercase letter.*, which must follow a letter or . and matches zero or more occurrences of that preceding element.A match must consume the entire word, not just a prefix or substring.
Implement pattern_exists(words, pattern).
words, a list of lowercase strings, and pattern, a lowercase pattern string containing letters, ., and *.True if any word matches the complete pattern; otherwise return False.* or contain consecutive * characters.def pattern_exists(words, pattern):