"[g-zG-Z||а-яА-Я||( )||~||`||!||@||#||$||%||^||&||*||(||)||_||+||/||ё||Ё||!||\"||№||;||:||?||-||=||\\[||\\]]"; 

It works :) But I would like to write something shorter. The essence of the expression is such that it is paired with DocumentFilter does not allow the user to enter any extraneous characters, except those relating to the HEX calculus system.

    1 answer 1

    For hexadecimal characters, it is easier to specify allowed characters than to look for violators:

    • How to make a logical NOT? That is, if the character does not fit under [0-9A-Fa-f] - wwvv
    • All figured out. Thank! - wwvv