Oliver Heger wrote:

If you use a properties file, you will have to double the backslash so that it is recognized by java.util.Properties. Single backslashes are interpreted as the beginning of an escape sequence. So you should have something like
biz.objects.brand.regex=.{0\\,30}

That works. Brilliant!!!


Do you also happen to know how I would have to express this in an XML config file? Also with a double-backslash? I remember trying one backslash and that didn't escape the comma.

Have a look at the JavaDocs for the load() method of java.util.Properties.

Thanks for the RTFM comment ;-) I hadn't looked at that.


Best Regards,

Tarlika



T E Schmitz schrieb:


Sorry guys, that doesn't work either :-(

I had tried that before; and tried it again:

biz.objects.brand.regex=.{0\,30}
Object o = config.getProperty("biz.objects.brand.regex");
logger.info ("REGEX " + o + " " + o.getClass());

Message: REGEX [.{0, 30}] class java.util.ArrayList


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to