How to filter based on name

Hi everyone,
i am trying to add an additional filter to the following based on sensor name “like” , typically i would use some logic in between “where like with wildcards” , but not sure how to implement this within Homeassistant templating

the code below will return all devices , with the current name , and state of type sensor

   {{ "| Device | State |\n" }} {{ "|:-:|:-:|\n" }} {%- for device in
    states.sensor -%} | {{ device.attributes.friendly_name + " | " +
    device.state + " |\n"}} {%- endfor -%}