modify regex to handle attributes specified with double or single quotes, trim each attribute