Matcher (@NonNls final String resourceBundleValue) { @NonNls String regexp = resourceBundleValue.replaceAll("([\\[\\]\\(\\)\\.\\*])", "\\\\$1"); regexp = regexp.replaceAll("\\{\\d+\\}", "(.+)"); return Pattern.compile(regexp, Pattern.CASE_INSENSITIVE).matcher(""); }