Extracting match strings in C code rather than R, for speed
Respecting marked encodings in pattern strings