How to add regex control to a textbox?

farukh

New member
Joined
Nov 13, 2014
Messages
2
Programming Experience
Beginner
Hello,


I was looking for a textbox can be filtered with regex patterns.


Suppose I have a textbox name textbox1 now I want to filter the textbox1.text with my regex pattern like [A-Za-z] so that the textbox1.text comes or only accepts the characters a-z and A-Z and any character other than that would be replaced by a "-" symbol. I want the regex pattern to filter each of the characters entered in the textbox and when the result of the teaxtbox comes in textbox1.text then it will filter and just replace the characters which are not in my regex pattern by something I give like "-"


Can somebody help me on how I can do it???


Thanks in advance...
 
Back
Top