I'm implementing PowerPoint macros in VBA and call upon the VBScript
regex support. I continually bump up against the
no-lookbehind-in-VBScript-regex wall.

Is there any expectation that VBScript regex will ever be enhanced to
add this functionality? If so, when? If not, what does the rest of
the world do in VBA when they want to check for strings not preceded by
some other string?

Is there any way at all to get regex support from VBA that *does*
support lookbehind (negative, esp.)?

Thanks...

Re: VBScript Regex Lookbehind: Ever? Before I retire? by Alexander

Alexander
Mon Jul 17 04:35:19 CDT 2006

david.f.jenkins@usa.net schrieb:

> I'm implementing PowerPoint macros in VBA and call upon the VBScript
> regex support. I continually bump up against the
> no-lookbehind-in-VBScript-regex wall.
>
> Is there any expectation that VBScript regex will ever be enhanced to
> add this functionality? If so, when?

There are obviously expectations to enhance VBS-Regexp regarding
lookbehind-patterns - at least following your post ;-), but there is
not any chance at all, that this will ever happen.

> If not, what does the rest of
> the world do in VBA when they want to check for strings not preceded by
> some other string?

Some presumably use VBS-RegExp-lookahead-patterns, others will use more
then one regular expression, most will use InStr, Mid, Like and friends
for probing string-patterns, some use a different RegExp-lib.

MfG,
Alex



Re: VBScript Regex Lookbehind: Ever? Before I retire? by david

david
Tue Jul 18 16:08:04 CDT 2006


Alexander Mueller wrote:
> david.f.jenkins@usa.net schrieb:
>
> > I'm implementing PowerPoint macros in VBA and call upon the VBScript
> > regex support. I continually bump up against the
> > no-lookbehind-in-VBScript-regex wall.
> >
> > Is there any expectation that VBScript regex will ever be enhanced to
> > add this functionality? If so, when?
>
> There are obviously expectations to enhance VBS-Regexp regarding
> lookbehind-patterns - at least following your post ;-), but there is
> not any chance at all, that this will ever happen.
>
> > If not, what does the rest of
> > the world do in VBA when they want to check for strings not preceded by
> > some other string?
>
> Some presumably use VBS-RegExp-lookahead-patterns, others will use more
> then one regular expression, most will use InStr, Mid, Like and friends
> for probing string-patterns, some use a different RegExp-lib.
>
> MfG,
> Alex

Thanks, Alex.

My application is for a searching/replacing capability for PowerPoint
presentation developers. Since it will be a general purpose search
facility, I won't have the luxury of implementing special code for
specific search strings. (Or at least I'm unwilling to examine, parse
out and apply lookbehinds.

However, I'm intrigued by your mention of other regex libraries. Do
you the name and source for those? Any feel for which ones might be
easy to install and access from VBA?


Re: VBScript Regex Lookbehind: Ever? Before I retire? by Alexander

Alexander
Wed Jul 19 08:06:05 CDT 2006

david.f.jenkins@usa.net schrieb:
> Alexander Mueller wrote:
>> david.f.jenkins@usa.net schrieb:

>>> Is there any expectation that VBScript regex will ever be enhanced to
>>> add this functionality? If so, when?

>> There are obviously expectations to enhance VBS-Regexp regarding
>> lookbehind-patterns - at least following your post ;-), but there is
>> not any chance at all, that this will ever happen.
>>
>>> If not, what does the rest of
>>> the world do in VBA when they want to check for strings not preceded by
>>> some other string?

>> Some presumably use VBS-RegExp-lookahead-patterns, others will use more
>> then one regular expression, most will use InStr, Mid, Like and friends
>> for probing string-patterns, some use a different RegExp-lib.

> Thanks, Alex.
>
> My application is for a searching/replacing capability for PowerPoint
> presentation developers. Since it will be a general purpose search
> facility, I won't have the luxury of implementing special code for
> specific search strings. (Or at least I'm unwilling to examine, parse
> out and apply lookbehinds.
>
> However, I'm intrigued by your mention of other regex libraries. Do
> you the name and source for those? Any feel for which ones might be
> easy to install and access from VBA?
>

I know of a non-COM-Dll "sed.dll" by Thomas Fuessl. It used to be quite
popular among VB-6-programmers who do not want to rely on WSH.
I am afraid it doesn't expose such advanced features as look-aheads or
look-behinds, also its syntax is subtly different from Javascript-styled
regexp of WSH.
There is RegExp-lib that ships with ComponentOne-ActiveX tools likes
flexgrid etc, which is commercial and not very powerful.
A hacking approach is to wrap the classes (or what you need of it)
of the System.Text.RegularExpressions .NET-Namespace into a COM-Lib.
Afaik .NET-RegExp have all flavours of lookarounds (both negative and
positive lookaheads and -behinds).
Writing a basic wrapper is probably not as much work as it sounds.

MfG,
Alex

Re: VBScript Regex Lookbehind: Ever? Before I retire? by david

david
Thu Jul 20 12:47:42 CDT 2006


Alexander Mueller wrote:
> david.f.jenkins@usa.net schrieb:
> > Alexander Mueller wrote:
> >> david.f.jenkins@usa.net schrieb:
>
> >>> Is there any expectation that VBScript regex will ever be enhanced to
> >>> add this functionality? If so, when?
>
> >> There are obviously expectations to enhance VBS-Regexp regarding
> >> lookbehind-patterns - at least following your post ;-), but there is
> >> not any chance at all, that this will ever happen.
> >>
> >>> If not, what does the rest of
> >>> the world do in VBA when they want to check for strings not preceded by
> >>> some other string?
>
> >> Some presumably use VBS-RegExp-lookahead-patterns, others will use more
> >> then one regular expression, most will use InStr, Mid, Like and friends
> >> for probing string-patterns, some use a different RegExp-lib.
>
> > Thanks, Alex.
> >
> > My application is for a searching/replacing capability for PowerPoint
> > presentation developers. Since it will be a general purpose search
> > facility, I won't have the luxury of implementing special code for
> > specific search strings. (Or at least I'm unwilling to examine, parse
> > out and apply lookbehinds.
> >
> > However, I'm intrigued by your mention of other regex libraries. Do
> > you the name and source for those? Any feel for which ones might be
> > easy to install and access from VBA?
> >
>
> I know of a non-COM-Dll "sed.dll" by Thomas Fuessl. It used to be quite
> popular among VB-6-programmers who do not want to rely on WSH.
> I am afraid it doesn't expose such advanced features as look-aheads or
> look-behinds, also its syntax is subtly different from Javascript-styled
> regexp of WSH.
> There is RegExp-lib that ships with ComponentOne-ActiveX tools likes
> flexgrid etc, which is commercial and not very powerful.
> A hacking approach is to wrap the classes (or what you need of it)
> of the System.Text.RegularExpressions .NET-Namespace into a COM-Lib.
> Afaik .NET-RegExp have all flavours of lookarounds (both negative and
> positive lookaheads and -behinds).
> Writing a basic wrapper is probably not as much work as it sounds.
>
> MfG,
> Alex

Thanks, Alex. The wrapper approach does sound duanting, however - I've
never done any kind of development such as that. Perhaps I'll do some
creative Googling to see if I can find some cookbooks/guidelines how to
accomplish the wrapper development.