improve alerta api regex handling