15.11.2003, 11:08
|
#10
|
Inventar
Registriert seit: 24.09.2001
Beiträge: 7.335
|
http://support.microsoft.com/default...b;en-us;301264
Zitat:
HOW TO: Match a Pattern Using Regular Expressions and Visual Basic .NET
This article demonstrates how to create and use regular expressions to determine whether strings match certain patterns. Regular expressions allow for easy parsing and matching of strings to a specific pattern. Using the objects available in the RegularExpressions namespace, you can compare a string against a given pattern, replace a string pattern with another string, or retrieve only portions of a formatted string. In this example, we will construct a pattern to validate a e-mail address.
|
http://msdn.microsoft.com/library/de...xpressions.asp
Zitat:
.NET Framework Regular Expressions
Regular expressions provide a powerful, flexible, and efficient method for processing text. The extensive pattern-matching notation of regular expressions allows you to quickly parse large amounts of text to find specific character patterns; to extract, edit, replace, or delete text substrings; or to add the extracted strings to a collection in order to generate a report.
...
|
http://www.microsoft.com/downloads/d...displaylang=en
Zitat:
Featured Highlights
* The "Simple Samples" tab is a good introduction to the use of regular expressions. You can see how to find the first occurrence of a number in a string, as well as try out increasingly difficult examples of field validation.
* The "Screen Scrape" tab shows off more advanced uses of regular expressions. You can enter a Web address and view the links or images contained therein. HTML tag attributes are displayed in a ListView control. You can double-click an image to view it, or double-click a link to open Internet Explorer and view the page.
* The "RegEx Tester" tab provides a convenient way for you to experiment with regular expressions. It also demonstrates how to do search and replace and string splitting.
|
http://www.microsoft.com/downloads/d...displaylang=en
Zitat:
Each textbox inherits a base "RegExTextBox" class. This class is responsible for validating the contents of a text box against a given regular expression.Featured Highlights
* Inheritance is used to modify the behavior of an existing control (the TextBox).
* The controls on this form utilize anchoring so that the form resizes intelligently without the developer having to write any code.
* When the user clicks the "Validate" button on the main form, the code loops through the controls collection to find all the RegExTextBox controls, then casts them to that base type to call their IsValid method.
|
|
|
|