Use a more flexible pattern to match tags.