java截取字符串中两个特殊字符之间的内容
解决方法:
假如我想截取一个字符串中所有{{}}之间的字符串
stringregex='\ " (((() (.*? () ) ) );
Stringstr='你好{{名字}},你叫{{性别}};
patternp=pattern.compile(regex );
matcherm=p.matcher(str;
然后,可以通过m的find和group方法获取数据。 有关详细信息,请访问http://www.Yayi house.com/Yayi shuwu/chapter/2891