-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different Results vs. VBScript? #19
Comments
…2 wrapper. Issue: #19 Signed-off-by: Jason Peter Brown <jason@bitspaces.com>
See changes to modTests.TestRegex2 method for a demonstration as per commit 66c88a1 |
Strange, that PCRE2 produces in fact only one significant result: File1.zip.exe instead of three. However, I think such From this point of view, difference in results between VBS/PCRE2 is only a matter of its internal error handler mechanism which has different realization. So, in real As a conclusion, personally I believe that it is not necessary to touch such behavior. Anyway, if I would change something, I would detect regexp string that allow empty result and replace result string with raising error. |
Although, if VBS already produces the most complete result, I still would not have refused if PCRE2 would produces the same result to support strategy of
But I don't khow, how you can track such cases and not break anything else. |
Yeah it's a bit of a weird one - interesting that some online regexp sites produce an error, but PCRE2 and VBScript produce results (albeit different). Makes it hard to know what the best approach is. It might be that there is a PCRE2 option flag to handle this situation, I'll ahve to look at them all more closely (or maybe it's just up to my Global matching loop to work a bit differently to produce the same results as VBScript). I don't have time to look closer right now, but I will try soon. |
According to my tests, no option pre-defined in your class allow to change behavior, except:
|
Both results are correct. The wrong here is your expectation.
So it seems OK, you just changed the default behavior for VBScript but not for PCRE in your test. |
Oh, I forgot to mention. I've never used your wrapper. |
When Multiline = TRUE and Global = True (for VbScript/NA for my wrapper) consider the following subject:
"File1.zip.exe" & vbCrLf & "File2.com" & vbCrLf & "File 3"
And the following regex:
.*$
VBScript returns 6 matches, but my wrapper returns only 2. Who is right?
The text was updated successfully, but these errors were encountered: