How can one know that any particular regular expression matches which type of input? Like I want to know about \$\{([\w]+)\}. Which string will be matched by this regular expression?
Pattern placeholder = Pattern.compile(“\\$\\{([\\w]+)\\}”);
Matcher mat = placeholder.matcher(“input”);
while (mat.find()) {
}
regex101.com is a nice website to debug regex.