@Override
                public void verifyText(org.eclipse.swt.events.VerifyEvent e)
                {
                    if (e.keyCode == 0) return;  // a list selection
                    if (hexRadioButton.getSelection()) {
                        Matcher numberMatcher = patternHexDigits.matcher(e.text);
                        e.doit = numberMatcher.matches();
                    }
                }
Group with text/hex selector and text input
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/dialogs/FindReplaceDialog.java