dops79

dops79

  • NA
  • 1
  • 0

Regex don't work :(

Aug 9 2004 12:11 PM
hi, i want validate my textbox using regular expressions. This is my code: [code] if(Regex.Match(tnome.Text,"^[0-9]*$").Success || Regex.Match(tcognome.Text,"^[0-9]*$").Success ) { MessageBox.Show("Alcuni campi devono contenere solo caratteri ALFABETICI, Nessun numero.","Errori riscontrati",MessageBoxButtons.OK,MessageBoxIcon.Warning); return false; } [/code] The problem are he numeric charter.. becose if i write only numbers the if statment return me normally false.. but if i write alphabetical charter and numerical charter it return me true.. I want that it return me false when i write a number or a number and charter and that it return me true when i write only alphabetical charter.. exuse my english raffaele ;)

Answers (1)