Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88868

RegExp vs IRegExp2: class name confusion

$
0
0

Example:

Dim oRegEx As IRegExp2
Set oRegEx = New regexp

Alternative:

Dim oRegEx As regexp
Set oRegEx = New regexp

Both produce the same result, that is an object named "oRegEx" of type "RegExp/IRegExp2" as shown in the Type column of the Locals window.

The object browser for the library VBScript_RegExp_55 only shows the class "RegExp".

So, my questions are:
1) what is "IRegExp2"?
2) Should I prefer "IRegExp2" or "regexp" in the Dim line?
3) What are the different meanings of the first and the second name in the Type column of the Locals window?


Viewing all articles
Browse latest Browse all 88868


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>