RegEx to match a string that DOES NOT contain angle brackets

by Al Beecy June 5, 2009

RegEx to match a string that DOES NOT contain angle brackets.

^((?![<>]).)*$

Useful for preventing script tags from being injected into web forms.

Tags:

Asp.Net | C# | Regular Expressions

Comments

June 14, 2009 #

DotNetKicks.com

RegEx to match a string that DOES NOT contain angle brackets

You've been kicked (a good thing) - Trackback from DotNetKicks.com

DotNetKicks.com

June 14, 2009 #

DotNetShoutout

RegEx to match a string that DOES NOT contain angle brackets

Thank you for submitting this cool story - Trackback from DotNetShoutout

DotNetShoutout

June 14, 2009 #

WebDevVote.com

RegEx to match a string that DOES NOT contain angle brackets

You are voted (great) - Trackback from WebDevVote.com

WebDevVote.com

Powered by BlogEngine.NET1.5.0.7 | Theme by Mads Kristensen