Important Update-Crystal is upgrading its Regex engine

Important Update Crystalists!

Crystal is on a roll with its way to upgrade its Regex engine. The new library version (PCRE2), although stricter than its predecessor PCRE for some edge cases, comes with extended support for important features which is definitely something to look forward to.

Please read all about the upgrade and the features of the new library in our blog, Heads up: Crystal is upgrading its Regex engine - The Crystal Programming Language

We’re super excited about the upgrade and awaiting to hear what the community has to say. Please do not hesitate to reach us in case there is a break in your project due to the upgrade, it will help us be appraised of the common issues and be available with fixes.

Happy contributing!

12 Likes

Any performance diff’s, besides the obvious face that the old will be going away?

Performance of PCRE vs PCRE2 should in general be similar or improved.

However we just became aware of a performance regression in the PCRE2 bindings. I’m sure it’ll be fixed before the 1.8 release.
Discussion: Regex performance regression on PCRE2 · Issue #13144 · crystal-lang/crystal · GitHub

1 Like

Thanks @straight-shoota for your incredible PR on Improve PCRE2 match performance for JIT and interpreted by straight-shoota · Pull Request #13146 · crystal-lang/crystal · GitHub !

2 Likes

Seth wrote about his experience doing the migration to PCRE2:

6 Likes

We’re asking for feedback on the effects of the migration to PCRE2. Please help out by responding to this poll: :bowing_man: