added regex to tag parsing instead of list comprehension