Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to chach no of characters in Textbox with the use of Reguler Exp.
#1
Solved: 10 Years, 9 Months ago Question 
Hi,
Chetan Here
i have recently joined.
i want to know that how we count number of characters in textbox.
There is one validation in my application
Validation:
The textbox contains minimum 2 charactors
Please help me
Reply
#2
Solved: 10 Years, 9 Months ago
1)You can use the len function which will return the length of the string pass the textbox value to this function.

2)
Code:
objRegExpr.Pattern = "[A-Za-z0-9]{2,}"

I am not sure whether you can have Special characters like _ etc.The above regex will work
for a text box which contains alphabets and numbers.

Regards

Regards
Reply
#3
Solved: 10 Years, 9 Months ago
Thanks Kishore
i think it may work for me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  trying to test that field doesn't have numeric characters jayraocourts 0 1,027 10-25-2019, 12:54 AM
Last Post: jayraocourts
  Regular Exp Issue Jyobtech 2 3,963 09-28-2012, 12:08 PM
Last Post: Jyobtech
  Regular Exp for mm/dd/yyyy date format dheerajm 6 18,098 08-28-2009, 12:30 PM
Last Post: basanth27
Wink Reguler Expression for URL: chetan-24 3 2,977 12-09-2008, 11:40 PM
Last Post: surya_7mar
  Reguler Expression in continuous sentence: chetan-24 3 2,853 11-29-2008, 10:53 PM
Last Post: surya_7mar

Forum Jump:


Users browsing this thread: 1 Guest(s)