RegEx.DLL

RegEx.DLL provides some much needed regular-expression handling for VB programmers, implementing all the common UNIX wildcard characters allowing sophisticated string comparisons and search-and-replace operations to be performed.

RegEx.DLL provides some much needed regular-expression handling for VB programmers. The 'clsRegEx' class implements all the common UNIX wildcard characters allowing sophisticated string comparisons and search-and-replace operations to be performed.

* The '*' character represents zero or more occurrences of the previous character in the expression:

ab*c matches ac, abc, abbc, abbbbbbbc ...

* The '+' character represents one or more occurrences of the previous character in the expression:

ab+c matches abc, abbc, abbbbbbbc but not ac

* Numbers within curly brackets represent a specific number of occurrences of the previous character:

a{3} matches aaa a{3, 5} matches aaa, aaaa and aaaaa

* The '?' character represents zero or one occurrences of the previous character:

a?c matches ac and aac

* The '.' character represents any single character:

a.c matches abc, aXc but not ac or abbc

Round brackets can be used to apply multipliers, such as '*' or '+', to groups of characters:

* (abc)* matches an empty string, abc, abcabc, abcabcabc ...

* (abc)+ matches abc, abcabc, abcabcabc ...

Square brackets can be used to specify possible values for a single character. A hyphen can be used in this context to represent a range of characters. If the first character within the brackets is a '^' then the range is exclusive rather than inclusive (ie. the expression matches any single character not shown):

* a[bB]c matches abc and aBc

* a[^0-9]c matches abc and aXc but not a0c ... a9c

A '\' symbol negates the special meaning of the following character. Only valid if it precedes one of *+?\{([])}.

* a\*c matches a*c

* a[\[\]]c matches a]c and a[c

* a\\c matches a\c

* ab\c is not a valid expression

The download includes VB code samples demonstrating how to use the library.

This library is still in beta test - it works well for short expressions, but due to the recursive nature of the code longer strings can take a while.

Download

System Requirements:

Win98, Windows2000, WinXP, Windows2003, Windows Vista Starter, Windows Vista Home Basic, Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate, Windows Vista Home Basic x64, Windows Vista Home Premium x64, Windows Vista Business x64, Windows Vista Enterprise x64, Windows Vista Ultimate x64

Version:

0.6.0

Last updated:

2010-05-05 15:32:41

Publisher:

Codebox Software

Homepage:

http://codebox.org.uk

File name:

File size:

29KB

License:

Freeware

Price:

0

You may also like...