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

{hashtag|#|somehashtag}

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:

#somehashtag

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?**);