Solutions for wildcard pattern matching.