I\'m effectively trying to do the same as in this question Change #hash tag to link on page load But I think because I\'m getting the string from a jquery objects data-capti
I would go for /#(\S+)/g to avoid the single #
/#(\S+)/g