1. Computing
in Delphi Tools and Components :: A regular expression (regex, regexp) is a string that describes or matches a set of strings, according to certain syntax rules. Regular expressions are used as a powerful and convenient way to recognise patterns in text.

Using regular expressions you can validate e-mail adresses, extract ZIP-codes from documents, search for complex patterns in files and much more.

Here's an example regex to validate a Windows file name: (?i)^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\\\./:\*\?\"<>\|][^\\/:\*\?\"<>\|]{0,254}$

Read the full article to locate RegEx / Regular Expression Components for Delphi


April 14, 2009 at 3:20 pm
(1) Stijn Sanders says:

Hey, they’ve forgotten the VBScript_RegExp_55_TLB, that’s provided by vbscript.dll since IE5! It’s my favourite, partly because the ‘binary weight’ falls entirely outside of the application and fully within a default IE5-dependency, and it performs pretty good on all kinds of regex’s

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.