ERROR: LoadError: PCRE JIT error: no more memory

It looks like you may be repeatedly compiling the expression for every CSV file.

Could you put a const Regexp somewhere and then reuse it?

Actually I see another issue. The \ need to be escaped.

const fmatch = r"^Code-Point\\Data\\CSV\\HD.[a-z]{3}"
2 Likes