Hi, BTW, this only happens when the third parameter is large. Here is an example that consistently crash here:
select regexp_count('jaime.casanova', 'valid', 102481); -- Jaime Casanova Director de Servicios Profesionales SystemGuards - Consultores de PostgreSQL