Returns the last error that occurred when using SRP_Regex.
Error = SRP_Regex("Error") |
An error message if there was an error on the last SRP_Regex call, "" if not.
The Error service returns an error message describing the error that occurred the last time an SRP_Regex service was called. This means that when the Match service, for example, returns 0, it might be due to an error in the pattern that was given to it rather than it failing the pass. The example below shows how to test for that error.
Pattern = '*@mydomain\.com$'
Result = SRP_Regex('Match', 'john.doe@mydomain.com', Pattern)
If Results EQ 0 then
Error = SRP_Regex('Error')
If Error NE "" then
// there was an error doing the match: "regex_error(error_badrepeat): One of *?+{ was not preceded by a valid regular expression."
end
end |