I am having difficulty reading regular expressions from a properties file using org.springframework.context.support.ResourceBundle MessageSource. The problem arises when the MessageSource interprets parts of the regex as asking for a substitution (like "{0}", "{1,date}", "{2,time}" within a message).

The regex I am using is: "^\d{1,3}$", which produces an IllegalArgumentException when read from the properties file.

Is there a way to tell MessageSource to ignore subsitution parameters? Or to hide them?

(I would assume that if you passed in null as the second parameter to getMessage(String, Object[], Locale), it would not look for substitution parameters.)