In Java, I am trying to return all regex matches to an array but it seems that you can only check whether the pattern matches something or not (boolean).
How can I u
Set keyList = new HashSet(); Pattern regex = Pattern.compile("#\\{(.*?)\\}"); Matcher matcher = regex.matcher("Content goes here"); while(matcher.find()) { keyList.add(matcher.group(1)); } return keyList;