Support ES6 regular expression flags `u` and `y`