RegExpr為Visual Basic 5.0、6.0和VBA 中的正則表達(dá)式提供全方位的源代碼模塊支持。 不需要任何額外的運(yùn)行庫(kù),只需要純粹的VB或VBA源代碼即可實(shí)現(xiàn)。
RegExpr adds regular expressions to Visual Basic 5.0, 6.0 and VBA.
支持的表達(dá)式:
RegExpr 支持廣泛的正則表達(dá)式類型,以下是其中的一部分支持列表。
x* | 0個(gè)或0個(gè)以上x |
x+ | 1個(gè)或1個(gè)以上x |
x? | 0個(gè)或者1個(gè)x |
x{m,n} | 最少m個(gè)最多n個(gè)x |
[A-Z] | A到Z的任意大寫字母 |
. | 換行符以外的任何單個(gè)字符 |
\w | 任何字母數(shù)字字符 |
\d | 任何數(shù)字,與0到9一樣 |
高級(jí)語(yǔ)法:
如果你對(duì)正則表達(dá)式已經(jīng)熟悉了,那么你一定會(huì)對(duì)RegExpr支持的那些復(fù)雜正則表達(dá)式感興趣。比如:
x*? | 最小匹配 |
$1 $2 ... | 子表達(dá)式 |
\1 \2 ... | 反向引用 |
(?=text) | 正向先行 |
(?!text) | 負(fù)向先行 |
系統(tǒng)需求:
VB:Visual Basic 5.0 和6.0,僅支持Windows系統(tǒng)。
VBA:Word、 Excel、 Access,運(yùn)行在Windows和Mac的平臺(tái)獨(dú)立解決方案。
兼容性:
Windows. RegExpr兼容所有版本的Windows。
Mac. RegExpr兼容Office for Mac。demo與幫助文件只能用于Windows。
What's in it? RegExpr for VB/VBA is a code module with support for a full range of regular expressions. Implemented as pure VB source code, it does not require any additional run-time libraries.
When do I need it? If you wish to use regular expressions in Visual Basic 5.0, 6.0 or VBA as if they were built in the language, you need RegExpr.
How do I learn them? We have written a tutorial in the help file. You may also read the introduction.
Can I just use VB's built-in Like and Replace? Sure you can - if you're happy with the features they support. Regular expressions are much more. They can search for all character combinations, allow "Or" rules, verify the number of character occurrences, and support zero-width concepts such as word boundaries, end-of-line and "not followed by".
What's good in Aivosto RegExpr? RegExpr for VB/VBA implements a full range of regular expressions. It's not a subset such as VB's Like. It doesn't require any OCXs or DLLs either, to save you from DLL hell.
What are the system requirements? RegExpr works with Visual Basic 5.0 and 6.0. It also works with Visual Basic for Applications in Word 97 or later, in Excel 95 or later, and in Access 95 or later.