RegularExpressionValidator regex = new RegularExpressionValidator(regexValidateEntryTextBox, new ValidatorConfigurationSource<String>() {
public String getConfigurationValue() {
String regex = regexEntryTextBox.getText();
if(regex.trim().equals("")) {
regexEntryTextBox.setText("(a|b)*");
return "(a|b)*";
}
return regex;