Section outline
-
Lesson 6. Basic .Net libraries. Strings and regular expressions.
Objective: is to form in students a comprehensive system of knowledge and practical skills in processing text information using the .NET platform tools. The student must master the functionality of the char character type and static methods of the System.Char class for analyzing and classifying individual characters. During the training, special attention is paid to understanding the fundamental difference between immutable string strings and dynamic StringBuilder objects, which allows optimizing application performance and effectively managing memory during text manipulation. Students must master the methods of the String class for comparing, searching, splitting, and merging strings, as well as learn to use StringBuilder for intensive editing of character information. An important aspect is studying the regular expression apparatus (Regex) as a powerful tool for pattern search and automated text editing. The student must learn to use metacharacters, qualifiers, and repeaters to build complex templates, such as phone number formats or identifiers. The practical component involves the ability to programmatically implement the search for text fragments using the IsMatch, Match and Matches methods, as well as perform mass data replacement using the Replace method of the Regex class. Finally, the student must be able to analyze text tasks to select the optimal information processing tools, ensuring correctness, speed and reliability of software solutions.