Quantcast
Channel: web – Imran Tariq's Blog
Viewing all articles
Browse latest Browse all 33

This regular expression is for which type of strings

$
0
0

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.


Viewing all articles
Browse latest Browse all 33

Trending Articles