If you update this method, you need to update as well `regexperror` to an `MCStringRef`. And be careful, `errbuf` is a return parameter. Plus, you can't use `MCStringAppendNativeChars()` on a non-mutable `MCStringRef`, which is the default when you create it.