Official Mumble VoIP Forums

username regex help

How to do...
Hi to all.
I've setted up a Mumble server on Raspberry for a local Amateur Radio community. Each Amateur Radio Operator have a worldwide unique callsign following these rules:
I need to put this rules as a regex for username field in mumble-server.ini but every try failed.

Can anyone help me?

You probably need to escape some of the special characters, and the worst part is that some of them need to be escaped twice if you paste them into a .ini file. I didn't think any of the characters you use require that though.

First of all though, what do you mean by "failed"? Does it simply not enforce them? Or does it not allow any new username after that point?
The regex works fine in other perl software I've made for personal use.
In username field in the mumble-serve.ini file it doesn't seems to work.
Any attempt to connect to mumble server is refused: "username invalid"
So I think I had to use another syntax... but what syntax have I to use?

Sorry about the delay - there's nothing wrong with your regex... the problem lies in the parser for Murmur.ini. If I paste your regex directly in to a script that sets it via Ice, it works as expected. However, setting it through the .ini doesn't work, as you said.

So I spent some time playing with it, and it turns out this works:

Code: Select all

I don't think the outside set of parenthesis is necessary, and I'm not sure whether setting the first either/or group being made non-matching matters. If you like, you can try just wrapping your original regexp in quotes and seeing if it works as expected, but I didn't think of that before blowing away my test server. :(

When I use the line pasted above, and restart the server (note that kill -hup doesn't reload configuration in Murmur, it only closes and re-opens log files), I am unable to connect with "fwaggle" or "FWAGGLE" but I am able to connect with "FW4GGLE".

Hope that helps. I'll update some examples on the Wiki.