Current area: HOME -> C# -> Regular Expressions Articles
Regular Expressions
C# Regular Expressions
In this article, I'll provide a quick overview of the classes and methods of the System.Text.RegularExpression assembly, some examples of matching and replacing strings, a more detailed walk-through of a grouping structure, and finally, a set of cookbook expressions for use in your own applications.
Regular Expressions tutorial
The Programmer's Heaven regular expressions area provides tutorials for beginners, guides to using regular expressions in various languages, a handy syntax quick-reference and a web-based regex testing tool.
Removing HTML Tags and Setting Text Length Using Regular Expressions
All to often, users try to enhance their displayed text through special characters or even HTML tags. There are some tags, that do no harm to the general design concept such as the BOLD <B></B>, PARAGRAPH <P></P>, or LINE BREAK <BR> tags. However, tags such as the <A HREF="">, <FONT>,or the <IMG> could really mess up the design. Those tags need to be removed. You could remove those tags either before updating the database, therefore not permitting the user to enter any of those tags, or you could simply "erase" those unwanted tags after pulling them from the database but BEFORE they would be displayed.
The 30 Minute Regex Tutorial
Did you ever wonder what Regular Expressions are all about and want to gain a basic understanding quickly? My goal is to get you up and running with a basic understanding of regular expressions within 30 minutes. The reality is that regular expressions aren't as complex as they look. The best way to learn is to start writing and experimenting. After your first half hour, you should know a few of the basic constructs and be able to design and use regular expressions in your programs or web pages.