completed method to parse attributed string and return a string of characters with that attribute