QRegExp reg_exp("[A-Za-z0-9_]+$");
ui->username_edit->setValidator(new QRegExpValidator(reg_exp, ui->username_edit));
ui->password_edit->setValidator(new QRegExpValidator(reg_exp, ui->password_edit));
"^\d+$"
"^[0-9]*[1-9][0-9]*$"
"^((-\d+)|(0+))$"
"^-[0-9]*[1-9][0-9]*$"
"^-?\d+$"
"^\d+(\.\d+)?$"
"^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$"
"^((-\d+(\.\d+)?)|(0+(\.0+)?))$"
"^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$"
"^(-?\d+)(\.\d+)?$"
"^[A-Za-z]+$"
"^[A-Z]+$"
"^[a-z]+$"
"^[A-Za-z0-9]+$"
"^\w+$"
"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$"
"^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$"
"^(d{2}|d{4})-((0([1-9]{1}))|(1[1|2]))-(([0-2]([1-9]{1}))|(3[0|1]))$"
"^((0([1-9]{1}))|(1[1|2]))/(([0-2]([1-9]{1}))|(3[0|1]))/(d{2}|d{4})$"
"^([w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$"
"(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?"
"^(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5])$"
<p><font size="3" color="#ff9900">^([0-9A-F]{2})(-[0-9A-F]{2}){5}$
^[-+]?\d+(\.\d+)?$