in reply to Questions: how to exclude substring having Evil meanings

The original requirement from my boss is that the CODE should be as short as possible

Give your new specs, what I suggested is just one char longer than what you have now.

xxyyyyyy xx = Two alphanums. Event Type. Supports 1,296 event types. yyyyyy = Six hex digits. Record num. Supports 16,777,215 records.

Advantages:

You can easily and cheaply substitute [0-9A-F] for another set of characters if you have OCR or bad words issues.

Do you really need to support that many event types? If not, you could probably shorten that the id to six digits.