Validate text using RegEx

0.00 avg. rating (0% score) - 0 votes

‘Email address:
Regex.IsMatch(
Me.txtEmail.Text, “w+([-+.’]w+)*@w+([-.]w+)*.w+([-.]w+)*”)

‘Alpha-numeric (no space):
Regex.IsMatch(
Me.txtUsername.Text, “^[0-9a-zA-Z]+$”)

‘Alpha-numeric with space, at least 5 chars:
Regex.IsMatch(
Me.txtUsername.Text, “[0-9a-zA-Z’ ‘]{5,} )

0.00 avg. rating (0% score) - 0 votes
ToughDev

ToughDev

A tough developer who likes to work on just about anything, from software development to electronics, and share his knowledge with the rest of the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>