Change sanitization for method name in server.js

To avoid duplicate method.names for different regexp a different sanitization has to be done.