# Important Update-Crystal is upgrading its Regex engine

**URL:** <https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447>\
**Category:** Official\
**Tags:** announces\
**Created:** [March 2, 2023, 2:25pm UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447 "2023-03-02T14:25:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mekhla18](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/mekhla18/32/1794_2.png) [@mekhla18](https://forum.crystal-lang.org/u/mekhla18)\
**Post date:** [March 2, 2023, 2:25pm UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/1 "2023-03-02T14:25:30Z")

</div>

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](https://crystal-lang.org/2023/03/02/crystal-is-upgrading-its-regex-engine/)

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!

---

<div class="post-metadata">

**Author:** ![drhuffman12](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/drhuffman12/32/715_2.png) [@drhuffman12](https://forum.crystal-lang.org/u/drhuffman12)\
**Post date:** [March 3, 2023, 5:25am UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/2 "2023-03-03T05:25:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [March 3, 2023, 9:32am UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/3 "2023-03-03T09:32:12Z")

</div>

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](https://github.com/crystal-lang/crystal/issues/13144)

---

<div class="post-metadata">

**Author:** ![paulocoghi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/paulocoghi/32/1429_2.png) [@paulocoghi](https://forum.crystal-lang.org/u/paulocoghi)\
**Post date:** [March 3, 2023, 12:55pm UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/4 "2023-03-03T12:55:55Z")

</div>

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](https://github.com/crystal-lang/crystal/pull/13146) !

---

<div class="post-metadata">

**Author:** ![beta-ziliani](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/beta-ziliani/32/1821_2.png) [@beta-ziliani](https://forum.crystal-lang.org/u/beta-ziliani)\
**Post date:** [March 8, 2023, 2:54pm UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/5 "2023-03-08T14:54:34Z")

</div>

Seth wrote about his experience doing the migration to PCRE2:

> **[Crystal PCRE2 Upgrade Guide](https://dev.to/seesethcode/crystal-pcre2-upgrade-guide-58eo)**
>
> It was announced recently that in Crystal 1.8.0 \>= 2.0.0 the default Regex engine is going to be...

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [March 24, 2023, 8:16am UTC](https://forum.crystal-lang.org/t/important-update-crystal-is-upgrading-its-regex-engine/5447/6 "2023-03-24T08:16:13Z")

</div>

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

> [@Poll: Experiences with the migration to PCRE2](https://forum.crystal-lang.org/t/poll-experiences-with-the-migration-to-pcre2/5499):
>
> A couple of weeks ago we announced the [upgrade of Crystal’s regex engine to PCRE2](https://crystal-lang.org/2023/03/02/crystal-is-upgrading-its-regex-engine/). The upgraded engine is used by default in [nightly releases](http://crystal-lang.org/install/nightlies) and can be optionally tested in Crystal 1.7 with the -Duse\_pcre2 flag (we recommend 1.7.3 for that). We have since received some feedback from the community. Besides positive and mostly (i.e. only requiring minor adjustments) reports, we’ve seen [a guide about diligent compatibility testing](https://dev.to/seesethcode/crystal-pcre2-upgrade-guide-58eo) and some [critical comments on the transition process](https://forum.crystal-lang.org/t/handling-the-pcre-to-pcre2-transition-and-versioning/5453). I am not awa…
