What does the following code/regex do in Java. I am looking at code written by another dev, but I can't make what the following regex does? Besides is it a well-known regex-pattern to use circle and square brackets ?
str.replaceAll("([%_])", "\\$1");