Chapter 1. Strings and Regular Expressions

Strings are a fundamental ingredient in almost every application. You’ll use string processing to validate user-supplied input, search a block of text for specific words or recurring patterns, and format numbers, dates, and times.

In the Microsoft .NET Framework, strings are based on the String class. The String class is far more than a simple array of characters—it also comes equipped with a full complement of methods for searching, replacing, and parsing text. The early recipes in this chapter (Combine Strings to Pad a String for Fixed-Width Display) show how you can use this built-in functionality to accomplish common string manipulation tasks. Later recipes consider some slightly more involved techniques, ...

Get Microsoft® Visual Basic® .NET Programmer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.