Is there any way to find out what is in a string by using wildcards?

Example:
find out what is in bgcolor by using wildcards.

bgcolor="*" would produce bgcolor="#FF00F1" or any of the other possable combo's of colors. like bgcolor=("black", "white", "red", etc.) or bgcolor=("#000000", "#FFFFFF", "#FF0000", etc.)