[英]Regular expression to extract the word from the string ${VALUE(word_to_be_extracted)} in java
What is the best regex to extract the word inside that string? 提取字符串中单词的最佳正则表达式是什么?
Pattern pattern = Pattern.compile("pattern here");
Matcher matcher = pattern.matcher(${VALUE(word_to_be_extracted)});
while(matcher.find()) {
System.out.println(matcher.group());
}
/\\$\\{VALUE\\((.*)\\)\\}/
第一个捕获组将成为您的承诺
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.