Am 30.04.2012 23:55, schrieb Tommi Mäkitalo:
>       "host" : "tntnet.org"
>
> matches also www.tntnet.org or even "foobartntnet.orgcom". If you want
> to be precise, you must write:
>
>       "host" : "^www\.tntnet\.org$"
>
>
>
> Tommi
>
The last example is not right. It should be:

"host" " "^www\\.tntnet\\.org$"

First you have to escape the backslash to the json parser, so that the 
regular expression sees the backslash, which escapes the dot, which is 
without escaping a placeholder for any character. This is a problem with 
json, which do not occur in xml. The json parser stops with a error 
message "invalid character '.' in string" when a single backslash is used.

Tommi

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to