RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Special Character Blocker
Expression
[^<>/?&{};#]+
Description
This expression stops the characters <>/?&{};# from a string of any length passing the regular expression validator in Visual Studio thereby stopping the HttpRequestValidationException (if client side validation and javascript is on)
Matches
any word | a | a number 4382
Non-Matches
< | > | / | ? | & | # | { | } | ;
Author Rating: Not yet rated. Paul Verhulpen
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Special Character Blocker
Name: Rover
Date: 9/2/2011 12:02:26 PM
Comment:
This is the answer I am looking for to prevent HTML and JavaScript injection. Thank you very much for this one.


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials