
Pattern.compile('\\[\\@([a-z|A-Z|0-9].*?)\\]');
Using the matcher to get the values
String mentionName = pm.group(1);Everything is works fine if it has only one [@name1] with specified pattern.If it has more than one like [@name1] [@name2] only one value is returned. is it possible to get more than one value from the group?3 件の回答

Hi Shingo,Thank you. But my problem is I am replacing the [@name] with some HTML and appending it.
I need to replace [@name] with a tag even if it has more than one pattern matched valuefc.CommentBody = fc.CommentBody.replace('[@' + mentionName + ']', '<a href=\'' + repo.getBaseUrl() + '/' + memberC.id + '\'>@' + mentionName + '</a>');