
13/09/2005, 20:50
|
 | | | Fecha de Ingreso: diciembre-2004 Ubicación: Cusco - Perú
Mensajes: 2.248
Antigüedad: 20 años, 1 mes Puntos: 7 | |
Otra alternativa:
Código:
// Borrar System.Text.RegularExpressions.RegexOptions.IgnoreCase si se desea que sea "case insensitive"
if (System.Text.RegularExpressions.Regex.IsMatch(textBox1.Text, @"NC\d{2}", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
{
MessageBox.Show("Correcto");
}
else
MessageBox.Show("Incorrecto");
Saludos |