View Full Version : RegExp Component
Steve Cimino
12-13-2000, 11:55 AM
I'm developing a project which uses regular expressions in Java. Currently, I have to have a Visual Basic COM object do all the regular expressions, which I think is rather pointless. Why you ask?<BR><BR>The only regular expression package that I've seen is sun.misc, which now Sun doesn't want you to use at all! No documentation, no nothing, since they're "retiring" the package.<BR><BR>So, the next logical step (IMO, of course) is to implement the VBScript DLL and use the regular expressions in there. Now, when you make a reference to this dll in VB, the path is:<BR><BR>C:windowssystemVBScript.dll3 <BR><BR>I have no idea what the 3 means, but I can't get that into Java. When I import the VBScript Globals, the Regular Expression object isn't in there.<BR><BR>I've searched several Java sites for a regular expression package, but to no avail. Does anyone know of any, or does anyone know of way to get VBScript's RegExp into a package?
Richard A. Lowe
12-14-2000, 01:52 AM
How do you import the classes a Dll exposes? Do you have to reference the dll directly? Can you import any publicly createable Windows' class into a package (I don't know much about Java - can you tell?).<BR><BR>(The VBScript.RegExp class exposes the RegExp object, in a logical sense, although it may live in the same dll.)<BR><BR>Richard
Steve Cimino
12-14-2000, 02:12 PM
Well, Visual J++ (I don't know how J Builder or even just a straight CLASS file would handle) builds a COM "wrapper" around your project. Basically, you point to the dll, and J++ generates a class file based on the exposed interfaces of that dll. Then, you have access to all the commands.<BR><BR>I'm certain that the VBScript.dll contains the RegExp object. Funny, even when you reference that dll in VB, it doesn't contain the RegExp object. It has two others... RegExp 5 and RegExp 5.5 that have to be included separately. That probably explains the /2 and /3 at the end of the file path.<BR><BR>Obviously you can reference that object in VB with the /3, but how can a "normal" language have access to it? What surprises me the most about this is that I'm completely in a Microsoft environment. I've even searched for the JScript dll hoping to find the regexp in that one. Do you happen to know the name of that dll?
Richard A. Lowe
12-21-2000, 12:53 PM
JScript.dll, but I'm not sure that it will help you - the REgExp object doesn't seem to be publically creatable or contain any of the methods that are exposed in ASP...<BR><BR>hhmmmmm many things here I don't get...<BR>sorry,<BR>Richard
Hope that this URL helps...<BR><BR>http://www.webtechniques.com/archives/2001/01/java/
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.