Improve regex for selectors to account for attributes.