I have a string returned by the LinkedIn API that contains a number of hashtags. They are formatted like this:


I am trying to use a regex with String.replaceAll that will replace all occurrence of these hashtags to a standard hashtag notation like this:


I think this regex will identify the hashtags in the string, but how do I identify what would replace it as the second parameter?

mystring.replaceAll(/(?<={hashtag|\#|)(.*)(?=})/g, **whatgoeshere?**);