2011/9/15 André Warnier <a...@ice-sa.com>:
> Konstantin Kolinko wrote:
>>
>> 2011/9/15 André Warnier <a...@ice-sa.com>:
>>>
>>> On the other hand, using a regexp provides for quite a bit of flexibility
>>> regarding ranges of addresses. You could use something like :
>>> "(127\\.0\\.0\\.1)|((0?:0?:0?:0?:0?:0?)?:0?:1)"
>>
>> Just 127\.0\.0\.1
>> It is XML - no need to double the slashes.
>
> For XML parsing not.  But then it becomes a String, and this String is
> passed to the regexp engine..
> And the regexp engine will interpret "." as "any character", while it
> interprets "\." as "a dot character".
> So, are you sure ?

String needs double "\" when it is written in Java sources or in
properties files. Double slash becomes single slash when the class is
compiled or when the properties file is read.

When it is in memory it does not need the double slashes.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to