473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Regular Expresssion Validation for Alpha_numeric

2
Hi,

Iam working in .net2.0 and i have a doubt at the time of entering a password i had used Regular Expression.

Here i want to enter only the combination of Alpha and Numeric but not only Alphabets and only Numeric.

If anybody knows the answer , Plz help me


Regards
rkm
Jun 27 '07 #1
2 971
Lokean
71
Hi,

Iam working in .net2.0 and i have a doubt at the time of entering a password i had used Regular Expression.

Here i want to enter only the combination of Alpha and Numeric but not only Alphabets and only Numeric.

If anybody knows the answer , Plz help me


Regards
rkm
Module Module1
Public Function isalphanumeric(ByVal astring As String) As Boolean
If IsNumeric(astring) Then
Return False
Exit Function
End If
Dim another As Char
Dim i As Int16
For i = 1 To Len(astring)
another = Mid(astring, i, 1)
If IsNumeric(another) Then
Return True
Exit Function
End If
Next
Return False
End Function
End Module
Jun 27 '07 #2
rkm
2
Hi,

Thanks for ur reply. I want the validation control in ASP.net 2.0 .

In my form it contains Password which should allow only the combination of

Alpha and Numeric but not only numbers or alphabets.

Regards
rkm


Module Module1
Public Function isalphanumeric(ByVal astring As String) As Boolean
If IsNumeric(astring) Then
Return False
Exit Function
End If
Dim another As Char
Dim i As Int16
For i = 1 To Len(astring)
another = Mid(astring, i, 1)
If IsNumeric(another) Then
Return True
Exit Function
End If
Next
Return False
End Function
End Module
Jun 29 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Eric Linders | last post by:
Hi, I'm trying to figure out the most efficient method for taking the first character in a string (which will be a number), and use it as a variable to check to see if the other numbers in the...
2
by: Bryce Budd | last post by:
Hi all, I am trying to use a regular expression validator to check for the existence of PO Box in an address textbox. The business rule is "No addresses with PO Boxes are allowed." What I...
1
by: seash | last post by:
Hi I need a regular expresssion which validates any kind of Phone numbers format..irrespective of the Country need hel ---seash
18
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How...
6
by: John Salerno | last post by:
Ok, this might look familiar. I'd like to use regular expressions to change this line: self.source += '<p>' + paragraph + '</p>\n\n' to read: self.source += '<p>%s</p>\n\n' % paragraph ...
8
by: sri_san | last post by:
Hello, I am trying to write a regular expresssion which validates against the URL and the textfield has 'http://' prefilled. I either want a valid URL or just leave the 'http://' as it is. I...
18
by: Lit | last post by:
Hi, I am looking for a Regular expression for a password for my RegExp ValidationControl Requirements are, At least 8 characters long. At least one digit At least one upper case character
2
by: Joey | last post by:
Hello guys, I'm trying to learn about regular expressions. I need to be able to use an RE that can evaluate for STRINGS (or specific sequences of characters), not just occurances of characters....
1
by: Shawn B. | last post by:
Greetings, I'm using a custom WebBrowser control: http://www.codeproject.com/KB/miscctrl/csEXWB.aspx When I get the DocumentSource of a web page I browsed, and run a regular expression...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.