ejabberd - Comments for "Registration Regexp" https://www.ejabberd.im/node/3311 en RE: Working examples of regexp and glob https://www.ejabberd.im/node/3311#comment-53846 <p>Thanks, that worked.<br /> I didn't realize that all the regex's I had tried were being stored in the database.<br /> That was the cause of my problems.</p> <p>Is user_glob more performant than user_regexp?<br /> I read somewhere that erlang's regex implementation is pretty rough around the edges.</p> Tue, 16 Dec 2008 19:22:00 +0000 dfisher comment 53846 at https://www.ejabberd.im Working examples of regexp and glob https://www.ejabberd.im/node/3311#comment-53839 <div class="quote-msg"> <div class="quote-author"><em>dfisher</em> wrote:</div> <p>I want to require every user name to end with a certain postfix.</p></div> <p>The regexp should be something like:</p> <div class="codeblock"><code>{acl, fruitname, {user_regexp, &quot;.*-apple$&quot;}}.<br />{acl, fruitname, {user_regexp, &quot;.*-orange$&quot;}}.<br />{access, register, [{allow, fruitname}, {deny, all}]}.</code></div> <p>Alternatively, instead of regexp you can use glob:</p> <div class="codeblock"><code>{acl, fruitname, {user_glob, &quot;*-apple&quot;}}.<br />{acl, fruitname, {user_glob, &quot;*-orange&quot;}}.<br />{access, register, [{allow, fruitname}, {deny, all}]}.</code></div> <p>The old ACLs that you tried are probably stored in the internal database. You can delete them using the WebAdmin.</p> Tue, 16 Dec 2008 11:51:54 +0000 mfoss comment 53839 at https://www.ejabberd.im