Template Sensor Intermittent IndexError

I have a series of sensors I’ve written that are triggered by an email through the imap event.

Each one gets a bit of data from the email. Some of them seem to work fine.
The others sometimes work, and sometimes I get IndexErrors.
For example:

Error rendering state template for sensor.health_alert_start_time: IndexError: list index out of range

I have been resending the same email over and over, and different sensors throw the IndexErrors each time, seemingly randomly, while others that had been throwing errors work fine the next time.

The sensors are all in the following format:

- name: Health Alert End Date
  state: >-
          {% set e_date = states('sensor.health_alert_end_date') %}
          {% if trigger.event.data["subject"] == "Heat-Health Alert has been issued for London" 
            or trigger.event.data["subject"] == "Cold-Health Alert has been issued for London" %}
            {{ trigger.event.data["text"] | regex_findall_index("(?:and )(\d{1,2}\/\d{1,2}\/\d{2,4})") | replace('/', '-')}}
          {% else %}
            {{ e_date }}
          {% endif %}

I’m at a loss and would appreciate any help.
Thanks.