Here, I think you misunderstood how the function works, it creates an error message from the `status`, which is returned through the 3rd parameter. Also, instead of creating a temporary variable, you should release `regexperror` (updated to an `MCStringRef`) and pass it to `regerror()` as it was done before.
Also, you only need to pass the size of the 3rd param of `regerror` if it's an array. If you use an `MCStringRef`, you don't need it - `MCStringRef`s have no size when they are created.