If you want to set your nickname to |300|31e5 for example, just set your nickname on your profile after you've enabled the nickname extension and changed the display name driver on appearance.
If you're saying you want to BLOCK |300|31e5 from being used, and all like it I don't think that is realistically possible through regex, and the fof/filter extension does not work on nicknames. I think in the future I read there could be plans for the fof/username request extension to support nicknames, which would allow you to vet nicknames before approving.
If you don't actually need to rely on nicknames, you can just use usernames and then use the username request extension to approve new usernames that meet your criteria. Or request fof/filter to support username filtering.