improves #6 tests for attribute check and fixes regex converting