Bettera and cleaner handling of arrtibute analyzing.

Implemented use of regex.