VB Script parser errors (6 replies)
I forgot to mention, neither .Test() nor .Replace() throw errors when they are "Checked".
Yes, you're going to receive errors when you check syntax after you have created an object such as a RegEx. The syntax check simply doesn't know what to do with the method call, however, as you have found out the function will run.
If you're wishing to avoid this, you could move the call to the RegEx to a Common function and then simply call the common function.
This is not the correct answer.
As I noted in my second comment, above, both .Test() and .Replace() pass the syntax check. If they pass, .Execute() should also pass. RegExp.Execute(string) is the syntax that has to be checked, not whether the syntax of the regular expression is valid.
By the way, even if I don't check syntax, IMan warns me that there is an error in the formula. There isn't. There is an error in the syntax checker.
John, we'll review and get back to you.
What has your review of this error revealed?
In script where .Execute() is called on a vbscript RegExp object, the parsing when "Check" is clicked shows an error. However, if the script is saved anyway, it works fine when the job runs.
Similar errors have been reported before, but have been closed "due to inactivity":
https://www.realisable.co.uk/issues-problems/vb-script-checker-false-negative-with-reserved-word-randomize/
https://www.realisable.co.uk/issues-problems/vb-script-checker-false-negative-with-multiple-variables-on-one-line/
https://www.realisable.co.uk/issues-problems/vb-script-checker-false-negative-with-const/