是这个吗?String s="aaaaa#{xxx}bbbb#{yyy}cccccc#{zzz}";
Matcher  m = Pattern.compile("#\\{.*?\\}").matcher(s);
while(m.find()){
System.err.println(m.group());
}