Uses masks; Procedure tform1.button1click (Sender: tobject); var S: string; begin S: = 'HTTP: // www.132435.com '; matchesmask (S, 'HTTP: // * '); // true matchesmask (S, 'HTTP ://*. com '); // true matchesmask (S ,'*. com '); // true matchesmask (S,' * .132435.com '); // true matchesmask (S, 'HTTP: // www. *. com '); // true matchesmask (S, 'HTTP: // www .??????. Com '); // true matchesmask (S, 'HTTP: // www.132435 .??? '); // True // Summary: similar to wildcards in DOS, case-insensitive. s: = 'in case of Delphi blog'; matchesmask (S, 'in case * '); // true matchesmask (S ,'???? Delphi blog '); // true matchesmask (S ,'?? ); // False // Summary: a Chinese character is treated as two characters. matchesmask ('20140901', '[1-9] [0-9] *'); // true matchesmask ('10x ', '[1-9] [0-9] *'); // true matchesmask ('001', '[1-9] [0-9] *'); // false matchesmask ('9x', '[1-9] [0-9] *'); // false matchesmask ('http ', '[f-h] *'); // true matchesmask ('ftp ',' [f-h] * '); // true matchesmask ('abc ', '[f-h] *'); // false // conclusion: You can use the processing method of the type subfield. end;