TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
raja ramesh
NA
50
108.4k
Regex Expressions
Sep 16 2011 9:01 AM
Hi,
I am working on windows applications
I am using Regex Expressions, I can write regex expression for only digits but my requirement is first to letters are "CH" after my textbox has to accept only digits
Ex: CH4324324
CH11111
CH789798......
In this scenario I dont want to change value CH as prefix of that box
user has to change only after this prefix so any one can tel me regex expression.
problem 2:
I have written to handle unwanted data in keypress events like following way
Regex regex = new Regex((sender as RadMaskedEditBoxElement).Mask);
if (!regex.IsMatch(e.KeyChar.ToString()))
e.Handled = true;
{
return;
}
But its working for only when I press key from keyboard but its not working for copy-paste and cut-paste and paste by using mouse but I want to handle unwanted data for paste
How to do this ?
Any one can tel me reply for above two questions....
Reply
Answers (
9
)
Run the html code which entered in textbox
C# UltraTree Node or Tree Node