How to do regex search and then show the regex match as an output in jinja2?
Solution 1:
The regex is fine and I'd suggest adding this in your view code, or even as an accessor, perhaps:
{% for vul3 in vul.ports_data %}
{% with vulns as vul3.vulnerabilities.vulners|trim|length %}
{% for cve in vulns.regex_list %}
<td>...
Or whatever you want to call it. I don't believe there is a built-in Jinja regex method that returns the list you're looking for, so you'll either want to add a custom filter or just add it in your view/model code which I'd suggest.