I am using Guus2005's Regular expression function so graciously contributed to the code repository. It's been great so far.
I have run into a bit of an issue regarding the 'lookaround' functionality (allows a pattern match to be broader than the return value).
immediate:
'The positive lookahead seems to work nicely...
'Ex. we only want the s returned but it must be followed by an h in the source string.
?Regexp("ashes", "s(?=h)")
s
'PROBLEM: The lookbehind syntax does not seem to find or return anything.?.
'Ex. we only want the h returned but it must be PRECEDED by an s in the source.
?Regexp("ashes", "(?<=s)h")
h <--expected but nothing is returned.
I am *hoping* I just am using the wrong syntax.
I am fearing it is a limitation of the VBScript.Regex function being called.
Flummoxed.
I have run into a bit of an issue regarding the 'lookaround' functionality (allows a pattern match to be broader than the return value).
immediate:
'The positive lookahead seems to work nicely...
'Ex. we only want the s returned but it must be followed by an h in the source string.
?Regexp("ashes", "s(?=h)")
s
'PROBLEM: The lookbehind syntax does not seem to find or return anything.?.
'Ex. we only want the h returned but it must be PRECEDED by an s in the source.
?Regexp("ashes", "(?<=s)h")
h <--expected but nothing is returned.
I am *hoping* I just am using the wrong syntax.
I am fearing it is a limitation of the VBScript.Regex function being called.
Flummoxed.