Returns the position of the element with the closest match to given key.
This function considers wildcards when searching for an element.
Example: Key | Element
-------------------
Foo.* | Debug
Foo.Bar | Alert
A lookup for "Foo.Foo" has no exact match. The next closest match is
"Foo.*" which will return the Debug element. Looking for "Foo" will
return Debug since it matches the wildcard "Foo.*".
If no exact and wildcard match is found No_Element is returned.