[Bug 1863] New: VBScript Regular Expression parser: cannot access results
Wine Bugs
wine-bugs at winehq.com
Wed Dec 3 15:51:43 CST 2003
http://bugs.winehq.com/show_bug.cgi?id=1863
Summary: VBScript Regular Expression parser: cannot access
results
Product: Wine
Version: unspecified
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: major
Priority: P2
Component: wine-ole
AssignedTo: wine-bugs at winehq.com
ReportedBy: ed-winebug at leafe.com
I'm using the 20031016 release of Wine on RH8. I have some Visual FoxPro code that needs to
parse regular expressions. The only way to do that is to instantiate a VBScript.RegExp object. The
VBScript classes are part of the Windows Script Host, so I downloaded the Windows Script Host
v5.6 from http://tinyurl.com/b81y, and installed it into Wine without any problems.
The VBScript.RegExp has a pretty clunky interface; it requires several layers of sub-object to get
the results. Here's a sample of the code you need to get a regular expression match. In it, I'm
trying to extract the digits in the middle of a serial number:
loRegEx = CREATEOBJECT("VBScript.RegExp")
loRegEx.Pattern = "[a-z]+([0-9]+)[a-z]+"
loExtract = loRegEx.Execute("The serial number is zx8392ks")
loResult = loExtract.Item(0)
* This next line throws an error
lcDigits = loResult.SubMatches(0)
RETURN lcDigits
If you run that code in Visual FoxPro under Wine, it proceeds along fine until the line indicated.
Trying to access the SubMatches child object of the result item always results in an error message
that reads:
OLE error code 0x80004005: Unknown COM status code
This isn't very informative to me, but I'm hoping that someone here will know how to fix this.
Without being able to access the SubMatches object, using Regular Expressions in VFP is
impossible. I've tried all sorts of expressions and patterns, and they all work well running VFP in
Windows, but throw an error when running under Wine.
In my wine config file, I have the following settings:
; Visual FoxPro 8:
[AppDefaults\\vfp8.EXE\\Version]
"Windows" = "win2k"
[AppDefaults\\vfp8.EXE\\DllOverrides]
"oleaut32" = "native, builtin"
"odbc32" = "native"
--
Configure bugmail: http://bugs.winehq.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list