{% set url = body | split(pat="href=") | slice(start=1) | first | split(pat=">") | first | trim_start_matches(pat='"') | trim_end_matches(pat='"') %} {% if 'https' in url %} {% if url is not containing("threefold") %} {% if url is not containing("localhost") %} {% endif %} {% endif %} {% else %} {% endif %}