.htaccess RewriteRule
// An example of negation. Everything except the stuff in ?!(here|and|here) is routed to index.php
// So for this example: all local stylesheets, javascript, photos, fonts, and captcha will still work.
// You MUST be careful and diligent if you wish to use this method--new features could break--but it works well.
RewriteEngine on
RewriteRule ^(.(?!(.css|.js|.png|.jpg|.gif|.webm|.svg|.cur|.eot|.woff|.ttf|captcha.php)$))*$ index.php
Character Limit
// An example of limiting characters.
^.{7,64}$
Usernames
// An example of validating usernames. For conveinence only; not to be used for security purposes!
// This is lowercase/uppercase letters, and numbers. Four to sixty-four characters long.
^[a-zA-Z0-9]{4,64}$