/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Pattern;
import java.util.stream.*;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		List<String> matches = Pattern.compile("\\[@([^\\s\\]\\[]+)]")
            .matcher("This comment is great **[@madeUpUser1](/madeUpUser1)** You said something similar did you mate? **[@madeUpUser2](/madeUpUser2)**")
            .results()
            .map(m -> m.group(1))
            .collect(Collectors.toList());

        for (String s : matches)
            System.out.println(s);
	}
}