public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
			if (str == null) {
				return;
			}
			if (maxLength < 0) {
				if (!isBlocked) {
					super.insertString(offs, str, a);
				}
			} else {
			}
			String formedString = textField.getText();
			currentRegex = prepareRegex(formedString);
			if (formedString.matches(currentRegex)) {
				return;
			} else {
				textField.setText(formedString.substring(0, formedString.length() - 1));
				return;
			}	
		}