Products
Database Search Solution (New Version) Search Control SEO Pager Highlighter Shortcut Controls Crypt Package Free ASP.NET Controls
Geotargeting Component ASP.NET Media Player Control Flash Video Player Control Services
ASP.NET Telecommute Jobs Free IP Location Lookup Test .Net Regular Expressions CSS/Table/DIV Page Layouts Custom Programming Article Sites Master List |
Test .Net Regular Expressions.Net Regular Expression Syntax Summary | Add to Favorites Choose Extract Data, Search-and-Replace, Data Validation or Split String option to test your regular expressions in four common scenarios in ASP.NET or other application that uses .Net RegEx engine. All RegexOptions can be turned on and off to fully adopt to your specific case. Extract DataVery common use of regular expressions is to extract wanted data from text. This test application uses Regex.Matches method to return result as string array. Search And ReplaceSearch and replace scenario uses two regular expressions: first expression search for data (like in previous Extract Data tester) and additional second expression defines replacement. Tester application uses Regex.Replace method to transform given text. Data ValidationTo check if string is formatted in certain way use Data Validation tester. Except Regex class which is universal solution, ASP.NET provides RegularExpressionValidator control that can be used to validate user input on web forms. More about both methods you can read at Data Validation With Regular Expressions In ASP.NET tutorial. Split StringIn split string case unlike other methods, regular expression is used to define what is NOT returned by Regex engine. When using Regex.Split method regular expression defines only divider, while result is array of strings that regular expression didn't match. |