A regular expression lets a command-line file search match text in each line using a pattern instead of string.Contains. In .NET, use Regex from System.Text.RegularExpressions; pass RegexOptions.IgnoreCase when case-insensitive matching is needed. section 4.1.5 section 2.4
Listing 2.8 namespace after using
using System.Text.RegularExpressions; #1
namespace System.Text;
public static class Bar
{
public static readonly Regex Letters = new Regex(@"[a-z]+");
}
This listing constructs a Regex from the pattern [a-z]+. section 2.4


























