akkadotnet/akka.net — pull request #519 by HCanber (2014-11-30 16:09:53+00:00)
Title: Fix regex for ActorPath so it can handle escaped characters correctly

This PR fixes errors introduced in PR #517 which caused the tests in `RemoteWatcherSpec` to fail.

__Escaped characters__
Escaped characters, i.e. % hex hex, for example `%2a` should be matched by the regex, but the regex used the named Unicode character class _N_. Like this

%\p{N}{2}

i.e. percent followed by exactly two characters from the named Unicode character class _N, All Numbers_.

The problem with that character class is that it also contains other number characters, such as Ⅷ⅓, so `%Ⅷ⅓` was incorrectly matched by the regex.
Also, the character class do not contain the hexadecimal letters `a-f` so `%2a` was not matched.

Changed

%\p{N}{2}

to:

%[0-9a-fA-F]{2}

__Parenthesis__
Allow usage of parenthesis ().
Note that AKKA JVM does not allow parenthesis ( ) but, according to RFC 2396, those are allowed and since we use URL Encode (see Akka.Remoting.AddressUrlEncoder) to create valid actor names, we must allow them too.