Text manipulation exists in almost any application, and handling text properly can improve application performance.
This book introduces VB. NET text processing, such as text storage, text replacement and appending, etc. The book compares the pros, cons, and speed of various text manipulation methods in detail, helping you to easily choose the most appropriate method in your application. This book focuses on using simple language. NET Framework's most important tools for processing strings - regular expressions, and introduces how to build your own expressions for matching and manipulating text. The explanations in this book are practical and vivid, and a large amount of code in the book can be directly used in your applications.
This book is suitable for work. NET developers who want to improve text processing efficiency in their applications.
Table of Contents
Chapter 1 How the system processes text
1.1. net framework
1.1.1 Common Language Runtime
1.1.2. net framework class library
1.2 Text is a data type
1.2.1 visual basic. net data types
1.2.2 Characters and character sets
1.2.3 String data type
1.3 Text Storage
1.3.1 Cache technology
1.3.2 Built-in
1.3.3 Other methods
1.3.4. net implementation
1.4 String operations
1.4.1 Connection string
1.4.2 Substring
1.4.3 Comparing strings
1.4.4 Data type conversion
1.4.5 Format string
1.5 String Usage
.1.5.1 Constructing String
1.5.2 Analyzing strings
1.6 Internationalization
1.7. net resource file
1.8 Summary
Chapter 2 String and stringbuilder classes
2.1 Learn the tools you will use in this chapter
2.2 Text Construction
2.3 visual basic and. net framework
2.3.1 Index
2.3.2 Null value and empty string
2.4 String class
2.4.1 Built-in string
2.4.2 Construction
2.4.3 Assigning a value to a string
2.5 stringbuilder class
2.5.1 Length and capacity
2.5.2 tostring() method
2.6 String operations
2.61 Connection
2.6.2 Substring
2.6.3 Comparing strings
2.6.4 Format
2.7 Use of strings
2.7.1 Create string
2.7.2 Mark
2.7.3 Reverse the order of strings
2.7.4 Insertion, deletion and replacement
2.7.5 Choosing between string and stringbuilder
2.8 Summary
Chapter 3 String Conversion
3.1 tostring() method
3.2 Represent numerical values as strings
3.3 Represent date and time as string
3.4 Represent other objects as strings
3.5 Use string to represent string
3.6 Represent strings as other types
3.6.1 Convert strings to numbers
3.6.2 Convert string to date and time
3.7 Moving strings between collections and arrays
3.7.1 Array
3.7.2 arraylist object
3.7.3 idictionary object
3.8 Summary
Chapter 4 Internationalization
4.1 unicode
4.2. net framework coding class
4.3 Processing strings
4.3.1 cultureinfo class
4.3.2 Uppercase and lowercase
4.3.3 Situations where culturally sensitive operations are not required
4.3.4 Sorting
4.4 Processing characters
4.4.1 Necessary information about characters
4.4.2 Agency pair
4.4.3 Combining characters
4.5 Formatting unicode strings
4.6 Summary
Chapter 5 Regular Expressions
5.1 system. text. regularexpressions
5.2 regex class
5.2.1 regexoptions
5.2.2 Class constructor
5.2.3 ismatch() method
5.2.4 replace() method
5.2.5 split() method
5.3 match and matchcollection classes
5.4 Regex detector example
5.5 Basic regular expression syntax
5.5.1 Match different character classes
5.5.2 Specify matching position
5.5.3 Specify repeated characters
5.5.4 Specified replacement
5.5.5 Special characters
5.6 Summary
Chapter 6 Advanced Concepts of Regular Expressions
6.1 Grouping, substitution and backreferencing
6.1.1 Simple grouping
6.1.2 group and groupcollection classes
6.1.3 Replacement
6. i. 4 Backreference
6.1.5 Advanced Group
6.2 Making decisions in regular expressions
6.3 Setting options within regular expressions
6.4 Rules of regular expression engine
6.5 Summary
Chapter 7 Regular Expression Patterns
7.1 Verification characters
7.2 Verification numbers
7.2.1 Only numbers
7.2.2 Contains only integer numbers
7.2.3 Floating point numbers
7.3 Verify phone number
7.4 Verify zip code
7.5 Verify email address
7.5.1 Verify IP address
7.5.2 Verify domain name
7.5.3 Verify personal address
7.5.4 Verify complete address
7.6 Analyze an smtp log file
7.7 html tag
7.7.1 Clear html from user input
7.7.2 Extract all html tags
7.7.3 HTML extraction example
7.8 Summary
Appendix a string class
a. 1 Constructor
a. 2 Properties
a. 3 Methods
Appendix b stringbuilder class
b. 1 Constructor
b. 2 Properties
b. 3 Methods
Appendix c Regular expression syntax
c. 1 Match characters
c. 2 Repeating characters
c. 3 Positioning characters
c. 4 Grouping characters
c. 5 Decision Characters
c. 6 Replacement characters
c. 7 Escape sequences
c. 8 Option flag
Appendix d Technical support, errata and code download
d. 1 How to download the sample code of this book
d. 2 Errata
d. 3 e-mail support
d. 4 p2p. wrox. com