improved regex for data attributes
added test cases for data attributes