Oh wait! Fixed it. It appears the issue was simply script initialization order. My plugin.json now has this:
"scripts": [
"../../public/vendor/xregexp/unicode/unicode-categories.js",
"public/main.js"
],
(Where main.js is my script that uses XRegExp.) And it works fine. The first time I tried this, the scripts were in reverse order. No need to copy the script into my plugin, though that did help me figure out the issue. Thanks for the suggestion!