I am facing a problem with regex. I want to check for sepecial characters like ><*&()%$@!~+...
I need to filter these special charecters...but the problem is in my 10 textboxes there only 3 are required...
I can submit the form without entering anything...but my regex is not allowing me to submit the form without giving a space from keyboard...
I just want to check for special charecters and empty textbox without giving a spacebar...
I just check these sites(http://regexlib.com/ and http://www.regular-expressions.info/) and read some documentation on regex...its kind of confusing....
Here is my regex for Middlename: ^[a-zA-Z''-'s]|[ ]{1,40}$ its worked but its not correct....then I changed it to ^[a-zA-Z''-'sd*]{1,40}$ this also not taking emptytextbox without giving a space...
My Goal:
In most of the textboxes I need to allow only numbers and - # _ in some textboxes....
For Address: need to allow alphabets and numbers and #-_' "
City: numbers and alphabets no special chars...
Main problem is I can write regex for most of these stuff but need to all textboxes without entering anything (empty textboxes).My work got stoped due to this.
I want to validate a textbox with regular expression so you only can enter numeric characters, but now I want that the error validation appear if the textbox be empty. here is the code
Types.Add("NUMBER", new Validation(@"[d]{1,255}","Only numbers can be entered in this field."));
the text box should validate in such a manner that the special characters like <,>,%,!,? should not appear in the text box.if appears an erroe msg should be displayed representing invalid name.or else it sholud be processen....
can any one tell the code(regular expression) for the above mentioned.
i have a textbox in my web form and i want to input any word with any character. so, only i want to check length of textbox less than 200 character. how can i do it with regular expression? and if i want to block some character how can i do it?
I having a two radio button. When the second radio button is enabled, a text box which accept the email id will appear. I am validating the Email using Regular expression validator.
When the second radio button is clicked, and I enter the invalid email id so that it shows me and error. But when I click the first radio button, it is  showing the save validation. I need this to not show the validation when the first radio button is clicked and invalid email id is there in the text box.
I need to construct a regular expression for the password textbox, Min:8,Max:16 and must include atleast a number(0-9),alphabets upper and lower case. I am unable to limit the length to 16.
this works good when I am using it for a normal(singleline) textbox.But when i use this with Multiline textbox it does not work. I am using RegularExpressionValidator control of asp.net for the same.Would there be any way I can make it compatible with Multiline textbox?
I need to construct a regular expression for the password textbox which shouldn't accept special characters($,@,!,etc).Even whitespaces,tabs. I tried the below this accepts special characters.
<asp:RegularExpressionValidator ID="RegEx" runat="server" ControlToValidate="Password" ErrorMessage="Password must be atleast 8 characters and include a number,alphabets upper case and lower case. "ToolTip="Password format is not correct" ValidationExpression="^(?=.{8})(?=.*d)(?=.*[a-z])(?=.*[A-Z]).*$"> </asp:RegularExpressionValidator>
I would like to validate the textbox for specific text and it must not be blank. But the regular expression validator is not validating if the text box is BLANK. However, it validates if I type something in the text box.
How can I make regular expression to trigger even if the text box is empty?
Should I use Required Validator + Regex Validator at the same time?
I'm trying to use the validator to work on a email form to ensure that they enter a valid from email address. That part works. I also want to add to the expression the text that I pre-populate in the txtbox ("Enter your email address") so on postback, after sending the message, I can clear the fields and repopulate that box.
How do I add that wording to the current expression: w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*
I am using Regular Expression validator for a text box. The below is working fine.It is not performing validation when I enter values like 0000..001.How can I modify validation expression? But it would allow values like 100,...5000 i.e zeros after a number.
<asp:RegularExpressionValidator ID="reg2" runat="server" ControlToValidate="rng2" ValidationExpression="^[0-9]+" ErrorMessage="*Please Enter a Valid Number for Second Range." ForeColor="Red" Font-Bold="True"></asp:RegularExpressionValidator>
I need some help in regular expression.I am validating the textbox text when updating the records.When i click the update button,the first 5 letters should be equal to CM000 or cm000.How to validate this using regular expression in asp.net. does anyone know validationexpression for this.